/* Lark Vineyard
   Colours and type per BRAND MANUAL (brand_manual/BRAND MANUAL.pdf) */

/* Gastela Serif — the manual's titles/headers face, used sparingly. */
@font-face {
  font-family: "Gastela Serif";
  src: url("../fonts/Gastela-Serif.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Primary colours */
  --earthbound-wool: #fffbf4;
  --twilight-pinot-noir: #36364c;

  /* Accent colours (unused on the landing page, kept for consistency) */
  --solaris-glow: #c9a971;
  --crushed-velvet: #64172d;
  --cutting-green: #445c57;

  /* Ranade for body/supporting text, Gastela Serif for titles (now bundled
     in fonts/, with a serif stack behind it). */
  --font-body: "Ranade", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Gastela Serif", Georgia, "Times New Roman", serif;

  /* Twilight Pinot Noir at low alpha, for hairline rules and borders. */
  --rule: rgba(54, 54, 76, 0.14);

  /* Shared page gutter, so the copyright line aligns with page content. */
  --page-padding: clamp(1.5rem, 4vw, 3rem);

  /* Bottom line: the social icon is set slightly larger than the copyright. */
  --copyright-size: clamp(0.75rem, 1.3vw, 0.9375rem);
  --social-icon-size: calc(var(--copyright-size) * 1.35);
}

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

/* Leaves room for the sticky header when jumping to an in-page anchor. */
html {
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background-color: var(--earthbound-wool);
  color: var(--twilight-pinot-noir);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

.landing {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--page-padding);
}

/* The logo doubles as the way into the rest of the site, so it sits in a
   button stripped of its native styling. */
.landing__gate-trigger {
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.landing__gate-trigger:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 6px;
}

/* Primary logo, centred on screen. Scales with the viewport but never drops
   below the 45px digital minimum from the manual's sizing rules. */
.landing__logo {
  display: block;
  width: clamp(45px, min(42vw, 42vh), 460px);
  height: auto;
}

/* "Coming soon..." sits at the bottom of the screen.
   Ranade body text: 14–18px, tracking 30 (~0.03em), leading 1.5+. */
.landing__message {
  position: absolute;
  bottom: var(--page-padding);
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: clamp(0.875rem, 1.6vw, 1.125rem);
  letter-spacing: 0.03em;
  line-height: 1.6;
  white-space: nowrap;
}

/* Bottom line of the page: copyright on the left, social link on the right. */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 var(--page-padding) var(--page-padding);
}

.footer__copyright {
  margin: 0;
  text-align: left;
  font-size: var(--copyright-size);
  letter-spacing: 0.03em;
  line-height: 1.6;
}

/* Padding widens the tap target; the matching negative margin keeps the icon
   optically flush with the page gutter. */
.footer__social {
  display: inline-flex;
  padding: 0.5rem;
  margin: -0.5rem;
  border-radius: 4px;
  color: inherit;
  transition: opacity 0.2s ease;
}

.footer__social:hover {
  opacity: 0.65;
}

.footer__social:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 2px;
}

.footer__social-icon {
  display: block;
  width: var(--social-icon-size);
  height: auto;
}

/* --- Secret-code prompt --------------------------------------------------- */

.gate {
  width: min(24rem, calc(100vw - 2 * var(--page-padding)));
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--rule);
  border-radius: 2px;
  background-color: var(--earthbound-wool);
  color: var(--twilight-pinot-noir);
  font-family: var(--font-body);
}

.gate::backdrop {
  background-color: rgba(54, 54, 76, 0.55);
}

/* Titles are Gastela's job in the manual; the serif stack stands in. */
.gate__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2.4vw, 1.5rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gate__hint,
.gate__label {
  font-size: clamp(0.875rem, 1.6vw, 1rem);
  letter-spacing: 0.03em;
  line-height: 1.6;
}

.gate__hint {
  margin: 0.75rem 0 1.5rem;
}

.gate__label {
  display: block;
  margin-bottom: 0.5rem;
}

.gate__input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background-color: var(--earthbound-wool);
  color: inherit;
  font-family: inherit;
  font-size: 1rem; /* 16px keeps iOS from zooming on focus. */
  letter-spacing: 0.03em;
}

.gate__input:focus-visible {
  outline: 1px solid var(--twilight-pinot-noir);
  outline-offset: 1px;
}

/* Crushed Velvet is the manual's callout colour. */
.gate__error {
  margin: 0;
  min-height: 1.6em; /* Reserved, so the dialog doesn't jump on error. */
  color: var(--crushed-velvet);
  font-size: clamp(0.875rem, 1.6vw, 1rem);
  letter-spacing: 0.03em;
  line-height: 1.6;
}

.gate__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Solaris Glow is the manual's colour for website CTAs. */
.gate__button {
  padding: 0.625rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 2px;
  background-color: var(--solaris-glow);
  color: var(--twilight-pinot-noir);
  font-family: inherit;
  font-size: clamp(0.875rem, 1.6vw, 1rem);
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.gate__button--quiet {
  background-color: transparent;
  border-color: var(--rule);
}

.gate__button:hover {
  opacity: 0.8;
}

.gate__button:focus-visible {
  outline: 1px solid var(--twilight-pinot-noir);
  outline-offset: 2px;
}

/* --- Sticky header (rest of the site) ------------------------------------ */

.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 0.75rem var(--page-padding);
  background-color: var(--earthbound-wool);
  border-bottom: 1px solid var(--rule);
}

.navbar__home {
  display: inline-flex;
  border-radius: 2px;
  color: inherit;
}

.navbar__home:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

/* Horizontal (secondary) logo — the manual's choice for website headers.
   Held above its 100px digital minimum at every viewport. 25% larger than before. */
.navbar__logo {
  display: block;
  width: clamp(150px, 25vw, 275px);
  height: auto;
}

.navbar__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem clamp(0.875rem, 2vw, 1.75rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.navbar__link {
  color: inherit;
  text-decoration: none;
  font-size: clamp(0.875rem, 1.4vw, 1rem);
  letter-spacing: 0.03em;
  line-height: 1.6;
  transition: opacity 0.2s ease;
}

.navbar__link:hover {
  opacity: 0.65;
}

.navbar__link:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

/* Current page is marked with a Crushed Velvet underline. */
.navbar__link[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--crushed-velvet);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.4em;
}

/* On narrow screens the menu drops below the logo and centres itself. */
@media (max-width: 40rem) {
  .navbar {
    justify-content: center;
  }

  .navbar__nav {
    width: 100%;
  }

  .navbar__list {
    justify-content: center;
  }
}

/* --- Page content -------------------------------------------------------- */

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2rem);
  padding: clamp(1.5rem, 4vw, 3rem) var(--page-padding);
  text-align: center;
}

.page__caption {
  max-width: 52ch;
  margin: 0;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  letter-spacing: 0.03em;
  line-height: 1.7;
}

.page__caption--figure {
  margin: clamp(1rem, 2vw, 1.5rem) auto 0;
}

/* Photos scale with the viewport and stay short enough to sit on one screen
   alongside the header and bottom line. */
.page__figure {
  width: min(100%, 60rem);
  margin: 0;
}

/* max-* with auto width/height lets the browser fit the photo inside both
   limits while keeping its aspect ratio. Setting width:100% alongside
   max-height instead would squash the image. */
.page__photo {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 70svh;
  margin-inline: auto;
  border-radius: 2px;
}

.page__video {
  display: block;
  width: min(100%, 60rem);
  height: auto;
  aspect-ratio: 1440 / 864;
  max-height: 70svh;
  object-fit: contain;
  border-radius: 2px;
  background-color: rgba(54, 54, 76, 0.06);
}

/* Studio Cristaline's own wordmark, in their own colour. Doubled in size. */
.page__wordmark {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
}

.page__link {
  display: inline-block;
  border-radius: 2px;
  color: inherit;
}

.page__link:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

.page__text-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--crushed-velvet);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.page__text-link:hover {
  opacity: 0.7;
}

/* --- About page: alternating rows layout ------------------------------------- */

.page--alt-rows {
  gap: clamp(2rem, 5vw, 4rem);
}

.alt-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.alt-row__figure {
  margin: 0;
}

.alt-row__photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
}

.alt-row__text {
  font-size: clamp(0.9375rem, 1.8vw, 1.125rem);
  letter-spacing: 0.03em;
  line-height: 1.7;
}

.alt-row__text p {
  margin: 0 0 1.25em 0;
}

.alt-row__text p:last-child {
  margin-bottom: 0;
}

/* alt-row--img-right: HTML has [text, image] for display as text left, image right */

@media (max-width: 48rem) {
  .alt-row {
    grid-template-columns: 1fr;
  }
}

/* --- Vineyard page: sections layout ----------------------------------------- */

.page--sections {
  gap: clamp(2.5rem, 6vw, 4.5rem);
}

.page-section {
  display: flex;
  flex-direction: column;
}

.page-section__text {
  max-width: min(100%, 48rem);
  margin-inline: auto;
  font-size: clamp(0.9375rem, 1.8vw, 1.125rem);
  letter-spacing: 0.03em;
  line-height: 1.7;
}

.page-section__text p {
  margin: 0 0 1.25em 0;
}

.page-section__text p:last-child {
  margin-bottom: 0;
}

.page-section__text strong {
  font-weight: 500;
}

.page-section__images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.side-by-side__figure {
  margin: 0;
}

.side-by-side__photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
}

@media (max-width: 48rem) {
  .page-section__images {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .landing__logo,
  .landing__message,
  .footer__copyright,
  .footer__social {
    animation: fade-in 1.2s ease-out both;
  }

  .landing__message,
  .footer__copyright,
  .footer__social {
    animation-delay: 0.3s;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
