/* Residenza Althea — tokens
   Editoriale boutique: hospitality, non SaaS */

:root {
  --ivory: #F7F4EE;
  --ivory-deep: #EDE8DC;
  --olive: #1C2318;
  --forest: #1C2318;
  --charcoal: #2A2A24;
  --taupe: #6B685F;
  --sage: #A9B19D;
  --bronze: #B08D57;
  --terracotta: #B77C59;
  --line: #E2DCD0;
  --line-on-green: rgba(247, 244, 238, 0.16);
  --focus: #B08D57;
  --hero-scrim: rgba(28, 35, 24, 0.55);

  --font-display: "EB Garamond", "Iowan Old Style", Georgia, serif;
  --font-sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --text-kicker: 0.75rem;
  --text-body: 1.0625rem;
  --text-small: 0.875rem;
  --text-nav: 0.9375rem;
  --text-h1: clamp(2.75rem, 1.35rem + 4.2vw, 4.5rem);
  --text-h2: clamp(2.15rem, 1.2rem + 2.4vw, 3.25rem);

  --leading-body: 1.6;
  --leading-display: 1.12;
  --measure: 36rem;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 6rem;
  --space-8: 8rem;

  --gutter: clamp(1.5rem, 6vw, 7.5rem);
  --page: 1120px;
  --header-h: 4.5rem;

  --ease: 350ms ease-out;
  --section-y: 4rem;
}

@media (min-width: 800px) {
  :root { --section-y: 4rem; }
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-padding-top: calc(var(--header-h) + 0.5rem);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: var(--leading-body);
  color: var(--charcoal);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture { display: block; max-width: 100%; }
img { height: auto; }
svg { max-width: 100%; }

a {
  color: var(--olive);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1px;
  transition: color var(--ease), background-size var(--ease);
}

a:hover { color: var(--bronze); background-size: 100% 1px; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 80;
  padding: 0.5rem 0.75rem;
  background: var(--forest);
  color: var(--ivory);
  text-decoration: none;
  background-image: none;
}

.skip-link:focus { top: 0.5rem; }

.wrap {
  width: min(var(--page), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.kicker {
  margin: 0 0 1rem;
  font-family: var(--font-sans);
  font-size: var(--text-kicker);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bronze);
}

.photo-note {
  display: block;
  margin: 0.5rem 0 0;
  width: 100%;
  max-width: none;
  font-family: var(--font-sans);
  font-size: clamp(0.625rem, 0.58rem + 0.2vw, 0.75rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  line-height: 1.45;
  color: color-mix(in srgb, var(--taupe) 48%, var(--ivory));
  text-align: left;
}

.photo-note--on-dark {
  color: color-mix(in srgb, var(--ivory) 42%, transparent);
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--leading-display);
  letter-spacing: -0.01em;
  color: var(--charcoal);
  margin: 0;
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }

h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--charcoal);
  margin: 0;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--forest);
  border-radius: 0;
  background: transparent;
  color: var(--forest);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-decoration: none;
  background-image: none;
  line-height: 1;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}

.btn:hover {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--ivory);
  text-decoration: none;
  background-image: none;
}

.btn--ghost {
  background: transparent;
  color: var(--olive);
  border-color: var(--olive);
}

.btn--ghost:hover {
  background: var(--olive);
  color: var(--ivory);
  border-color: var(--olive);
}

.btn--on-green {
  background: #fff;
  border-color: #fff;
  color: var(--forest);
}

.btn--on-green:hover {
  background: var(--ivory);
  border-color: var(--ivory);
  color: var(--forest);
}

.btn--ghost-on-green {
  background: transparent;
  border-color: color-mix(in srgb, var(--ivory) 45%, transparent);
  color: var(--ivory);
}

.btn--ghost-on-green:hover {
  background: var(--ivory);
  color: var(--forest);
  border-color: var(--ivory);
}

button.btn {
  cursor: pointer;
  appearance: none;
  font-family: inherit;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.link-quiet {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--olive);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 1px;
  text-underline-offset: 4px;
}

.link-quiet:hover { color: var(--bronze); }

.link-quiet--light {
  color: #E8E2D6;
}

.link-quiet--light:hover { color: var(--ivory); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 400ms ease-out, transform 400ms ease-out;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
