/* ==========================================================================
   Riversprings, Tigoni — launching-soon single frame
   ========================================================================== */

@font-face {
  font-family: "Optima";
  src: url("assets/fonts/Optima-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Optima";
  src: url("assets/fonts/Optima-DemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pelago";
  src: url("assets/fonts/Pelago-Light-Text.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #ffffff;
  --ink-soft: rgba(255, 255, 255, 0.86);
  --ground: #2b3026;

  --serif: "Optima", "Optima nova", Candara, "Gill Sans", "Trebuchet MS", sans-serif;
  --mark: "Pelago", "Optima", Candara, "Gill Sans", sans-serif;

  /* Arrival sequence — every value is a start time in ms. */
  --t-head: 300ms;
  --t-eyebrow: 2100ms;
  --t-body: 2260ms;
  --t-bliss: 2420ms;
  --t-invite: 2620ms;
  --t-tel: 2740ms;
  --t-mail: 2860ms;
  --t-brand: 3000ms;
  --t-place: 3100ms;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--mark);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 220ms var(--ease-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 4px;
}

/* --------------------------------------------------------------------------
   Stage — the full-bleed frame
   -------------------------------------------------------------------------- */

/* Height is driven by .frame alone. Declaring 100svh on both this and
   .frame rounds the same value twice and leaves a hairline scrollbar. */
.stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.stage__media {
  position: absolute;
  inset: 0;
  z-index: -3;
}

.stage__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 54%;
  transform-origin: 52% 46%;
  animation:
    plate-settle 2600ms var(--ease-out) both,
    plate-drift 44s ease-in-out 2600ms infinite alternate;
}

/* Elliptical scrim, shaped like the copy column.
   A bottom-weighted ramp leaves centred type sitting on the brightest
   part of a dawn frame — this must stay an ellipse. */
.stage__scrim {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(
      72% 62% at 50% 47%,
      rgba(24, 30, 22, 0.62) 0%,
      rgba(24, 30, 22, 0.5) 42%,
      rgba(24, 30, 22, 0.22) 72%,
      rgba(24, 30, 22, 0) 100%
    ),
    linear-gradient(
      to bottom,
      rgba(20, 26, 19, 0.42) 0%,
      rgba(20, 26, 19, 0.24) 14%,
      rgba(20, 26, 19, 0.08) 26%,
      rgba(20, 26, 19, 0.08) 62%,
      rgba(20, 26, 19, 0.32) 100%
    );
  animation: scrim-in 2000ms ease-out 200ms both;
}

/* Slow breathing light, sitting where the sun sits in the frame. */
.stage__glow {
  position: absolute;
  inset: -10%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    38% 42% at 34% 12%,
    rgba(255, 236, 190, 0.22) 0%,
    rgba(255, 236, 190, 0.08) 45%,
    rgba(255, 236, 190, 0) 78%
  );
  mix-blend-mode: screen;
  animation: glow-drift 19s ease-in-out 2400ms infinite alternate;
  opacity: 0;
}

/* --------------------------------------------------------------------------
   Frame — content grid
   -------------------------------------------------------------------------- */

.frame {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: clamp(1.2rem, 2.6vh, 2.6rem);
  min-height: 100vh;
  min-height: 100svh;
  /* The 1fr row cannot shrink below its content's min-content height, so
     the padding is what buys the frame its headroom. Trimmed until every
     tested viewport reports zero overflow. */
  padding: clamp(1.6rem, 4vh, 3.2rem) clamp(1.25rem, 5vw, 4.5rem)
    clamp(1.2rem, 2.8vh, 2.2rem);
}

.frame__main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0;
}

/* --- LAUNCHING SOON! ------------------------------------------------------
   No blur on the headline. A blur-in here made the previous build's H1
   unreadable for over a second on arrival. Letter-spacing settles instead. */
.headline {
  margin: 0;
  font-size: clamp(1.6rem, 5.4vmin, 3.9rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  text-shadow: 0 1px 26px rgba(18, 24, 16, 0.42);
  animation: head-settle 1500ms var(--ease-out) var(--t-head) both;
}

/* --- Riversprings script -------------------------------------------------- */
.wordmark {
  width: clamp(13rem, 52vmin, 35rem);
  margin: clamp(1rem, 2.4vh, 2.2rem) 0 clamp(1.1rem, 2.8vh, 2.4rem);
  filter: drop-shadow(0 2px 30px rgba(18, 24, 16, 0.4));
}

.wordmark svg {
  width: 100%;
  height: auto;
}

/* --- NATURE-INSPIRED TIGONI LIVING ---------------------------------------- */
.eyebrow {
  margin: 0;
  font-family: var(--mark);
  font-weight: 300;
  font-size: clamp(0.66rem, 1.5vmin, 1.02rem);
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-shadow: 0 1px 18px rgba(18, 24, 16, 0.5);
  animation: rise-in 1100ms var(--ease-out) var(--t-eyebrow) both;
}

/* --- Standfirst ----------------------------------------------------------- */
.standfirst {
  max-width: min(80rem, 84vw);
  margin: clamp(1.4rem, 3.4vh, 3rem) 0 0;
  font-size: clamp(0.92rem, 1.95vmin, 1.35rem);
  line-height: 1.62;
  color: var(--ink-soft);
  text-wrap: balance;
  text-shadow: 0 1px 20px rgba(18, 24, 16, 0.5);
  animation: rise-in 1100ms var(--ease-out) var(--t-body) both;
}

.bliss {
  margin: clamp(1rem, 2.6vh, 2rem) 0 0;
  font-size: clamp(1rem, 2.2vmin, 1.55rem);
  font-weight: 600;
  letter-spacing: 0.005em;
  text-shadow: 0 1px 20px rgba(18, 24, 16, 0.5);
  animation: rise-in 1100ms var(--ease-out) var(--t-bliss) both;
}

/* --- Contact -------------------------------------------------------------- */
.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.35rem, 0.9vh, 0.7rem);
  margin: clamp(2.4rem, 6.4vh, 5.4rem) 0 0;
  font-style: normal;
}

.contact__invite {
  margin: 0 0 clamp(0.4rem, 1.2vh, 0.9rem);
  font-size: clamp(1rem, 2.2vmin, 1.55rem);
  font-weight: 600;
  text-shadow: 0 1px 20px rgba(18, 24, 16, 0.5);
  animation: rise-in 1000ms var(--ease-out) var(--t-invite) both;
}

.contact__link {
  position: relative;
  font-size: clamp(1rem, 2.4vmin, 1.62rem);
  line-height: 1.34;
  text-decoration: none;
  text-shadow: 0 1px 20px rgba(18, 24, 16, 0.5);
}

.contact__link--tel {
  animation: rise-in 1000ms var(--ease-out) var(--t-tel) both;
}

.contact__link--mail {
  animation: rise-in 1000ms var(--ease-out) var(--t-mail) both;
}

/* Rule wipes in from the left on hover — the ruled-link idiom
   carried over from the full site. */
.contact__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.14em;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0.75;
  transition: transform 420ms var(--ease-out);
}

.contact__link:hover::after,
.contact__link:focus-visible::after {
  transform: scaleX(1);
}

/* --------------------------------------------------------------------------
   Foot — lockup and place line
   -------------------------------------------------------------------------- */

.frame__foot {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: clamp(0.8rem, 2vw, 2rem);
}

.foot__brand {
  grid-column: 3;
  justify-self: end;
  width: clamp(7rem, 17.5vmin, 13rem);
  filter: drop-shadow(0 2px 22px rgba(18, 24, 16, 0.45));
  animation: rise-in 1200ms var(--ease-out) var(--t-brand) both;
}

.place {
  grid-row: 2;
  grid-column: 1 / -1;
  margin: clamp(0.7rem, 1.8vh, 1.5rem) 0 0;
  font-family: var(--mark);
  font-weight: 300;
  font-size: clamp(0.6rem, 1.4vmin, 0.92rem);
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink-soft);
  text-shadow: 0 1px 18px rgba(18, 24, 16, 0.55);
  animation: rise-in 1100ms var(--ease-out) var(--t-place) both;
}

/* --------------------------------------------------------------------------
   Keyframes
   -------------------------------------------------------------------------- */

@keyframes plate-settle {
  from {
    transform: scale(1.14);
    filter: blur(16px) brightness(0.72) saturate(0.86);
  }
  to {
    transform: scale(1);
    filter: blur(0) brightness(1) saturate(1);
  }
}

@keyframes plate-drift {
  from {
    transform: scale(1) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.065) translate3d(-1.1%, -0.9%, 0);
  }
}

@keyframes scrim-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes glow-drift {
  from {
    opacity: 0.35;
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    opacity: 0.95;
    transform: translate3d(2.4%, 1.6%, 0) scale(1.09);
  }
}

@keyframes head-settle {
  from {
    opacity: 0;
    letter-spacing: 0.34em;
    transform: translateY(0.32em);
  }
  to {
    opacity: 1;
    letter-spacing: 0.045em;
    transform: translateY(0);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(1.15rem);
    filter: blur(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* --------------------------------------------------------------------------
   Narrow screens
   -------------------------------------------------------------------------- */

@media (max-width: 48rem) {
  .frame__foot {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .foot__brand {
    grid-column: 1;
    justify-self: center;
    width: clamp(9rem, 34vw, 12rem);
  }

  .place {
    grid-column: 1;
  }

  .standfirst {
    max-width: 100%;
    text-wrap: pretty;
  }

  /* A 9:19.5 crop of a 16:9 aerial keeps only a sliver. Centre it on the
     road and tea terraces — the default centre lands on plain forest and
     the frame reads as an anonymous green field. */
  .stage__media img {
    object-position: 43% 48%;
  }

  /* Copy column is nearly full-width on a phone — widen the scrim to match. */
  .stage__scrim {
    background:
      radial-gradient(
        108% 58% at 50% 46%,
        rgba(24, 30, 22, 0.66) 0%,
        rgba(24, 30, 22, 0.54) 46%,
        rgba(24, 30, 22, 0.24) 76%,
        rgba(24, 30, 22, 0) 100%
      ),
      linear-gradient(
        to bottom,
        rgba(20, 26, 19, 0.46) 0%,
        rgba(20, 26, 19, 0.2) 26%,
        rgba(20, 26, 19, 0.2) 60%,
        rgba(20, 26, 19, 0.58) 100%
      );
  }
}

/* Short viewports — the composition is meant to hold on one screen, so
   compress the rhythm rather than let it scroll. Applies at every width:
   a short landscape phone overflows harder than a laptop does. */
@media (max-height: 46rem) {
  .frame {
    gap: clamp(0.7rem, 2vh, 1.6rem);
    padding-top: clamp(1.1rem, 3vh, 2.2rem);
    padding-bottom: clamp(0.9rem, 2.4vh, 1.8rem);
  }

  /* Type is already sized in vmin, so it shrinks with the height on its
     own — only the rhythm between elements needs tightening here. */
  .wordmark {
    margin: clamp(0.5rem, 1.6vh, 1.2rem) 0 clamp(0.6rem, 1.8vh, 1.4rem);
  }

  .standfirst {
    margin-top: clamp(0.8rem, 2vh, 1.6rem);
  }

  .bliss {
    margin-top: clamp(0.55rem, 1.6vh, 1.2rem);
  }

  .contact {
    margin-top: clamp(1rem, 3vh, 2.4rem);
  }

  .place {
    margin-top: clamp(0.4rem, 1.2vh, 1rem);
  }
}

/* --------------------------------------------------------------------------
   Reduced motion — everything resolves immediately.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .stage__media img,
  .stage__scrim,
  .stage__glow,
  .headline,
  .eyebrow,
  .standfirst,
  .bliss,
  .contact__invite,
  .contact__link,
  .foot__brand,
  .place {
    animation: none !important;
    opacity: 1;
    filter: none;
    transform: none;
    letter-spacing: revert-layer;
  }

  .headline {
    letter-spacing: 0.045em;
  }

  .eyebrow {
    letter-spacing: 0.34em;
  }

  .place {
    letter-spacing: 0.3em;
  }

  .stage__glow {
    opacity: 0.5;
  }

  .contact__link::after {
    transition: none;
  }
}
