/* ==========================================================================
   Frontier Tobacco — shared stylesheet
   Design tokens, base typography, and the main (daylight) site.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Reset
   -------------------------------------------------------------------------- */

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

* {
  margin: 0;
  padding: 0;
}

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

/* Neutralises the width/height HTML attributes so aspect-ratio governs the
   box. Without this, an <img width="1200" height="1504"> renders 1504px tall. */
img,
video {
  height: auto;
}

ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   2. Design tokens
   -------------------------------------------------------------------------- */

:root {
  /* Heritage refined palette — light */
  --background: oklch(0.985 0.012 85); /* warm surface */
  --foreground: oklch(0.24 0.025 145); /* deep forest */
  --secondary: oklch(0.86 0.045 80); /* sand */
  --accent: oklch(0.46 0.13 50); /* saddle brown */
  --border: oklch(0.24 0.025 145 / 0.12);

  --font-serif: "Cormorant Garamond", ui-serif, Georgia, serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;

  /* Layout */
  --pad-x: 1.5rem;
  --pad-x-md: 3rem;
  --wrap: 72rem;
}

.dark {
  /* Heritage palette — dark */
  --background: oklch(0.18 0.015 60); /* deep tobacco brown-black */
  --foreground: oklch(0.94 0.02 80); /* warm cream */
  --secondary: oklch(0.32 0.03 70); /* dark sand */
  --accent: oklch(0.68 0.14 55); /* warm amber/copper */
  --border: oklch(0.94 0.02 80 / 0.14);
}

/* Translucent shades of the foreground colour, used throughout for
   secondary text and hairline borders. */
:root {
  --fg-75: color-mix(in oklab, var(--foreground) 75%, transparent);
  --fg-70: color-mix(in oklab, var(--foreground) 70%, transparent);
  --fg-65: color-mix(in oklab, var(--foreground) 65%, transparent);
  --fg-60: color-mix(in oklab, var(--foreground) 60%, transparent);
  --fg-50: color-mix(in oklab, var(--foreground) 50%, transparent);
  --fg-30: color-mix(in oklab, var(--foreground) 30%, transparent);
  --fg-20: color-mix(in oklab, var(--foreground) 20%, transparent);
  --bg-70: color-mix(in oklab, var(--background) 70%, transparent);
  --bg-60: color-mix(in oklab, var(--background) 60%, transparent);
  --bg-15: color-mix(in oklab, var(--background) 15%, transparent);
}

/* --------------------------------------------------------------------------
   3. Base
   -------------------------------------------------------------------------- */

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  letter-spacing: -0.01em;
  font-weight: 600;
}

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

/* --------------------------------------------------------------------------
   4. Shared pieces
   -------------------------------------------------------------------------- */

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
}

/* Eyebrow label above section headings */
.eyebrow {
  display: block;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.625rem;
  font-weight: 600;
}

.eyebrow--lg {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
}

/* Age-restriction bar */
.compliance {
  background-color: var(--foreground);
  color: var(--background);
  padding: 0.5rem 1.5rem;
  text-align: center;
}

.compliance p {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-weight: 500;
}

/* Site navigation */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem var(--pad-x);
  border-bottom: 1px solid var(--border);
}

.nav__brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.nav__brand span {
  color: var(--accent);
}

.nav__links {
  display: none;
  gap: 2.5rem;
  font-size: 0.75rem;
  line-height: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 500;
}

.nav__links a {
  transition: color 0.2s;
}

.nav__links a:hover,
.nav__links a.is-current {
  color: var(--accent);
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav__place {
  font-size: 0.75rem;
  line-height: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  border-bottom: 1px solid var(--fg-30);
  padding-bottom: 0.25rem;
  transition:
    color 0.2s,
    border-color 0.2s;
  white-space: nowrap;
}

.nav__place:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Light/dark switch */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
  border-radius: 9999px;
  border: 1px solid var(--fg-20);
  transition:
    color 0.2s,
    border-color 0.2s;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.theme-toggle svg {
  width: 1rem;
  height: 1rem;
}

/* Only one of the two icons shows, depending on the active theme. */
.theme-toggle .icon-sun {
  display: none;
}

.dark .theme-toggle .icon-sun {
  display: block;
}

.dark .theme-toggle .icon-moon {
  display: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 1rem 2rem;
  font-size: 0.75rem;
  line-height: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    color 0.2s;
}

.btn--solid {
  background-color: var(--foreground);
  color: var(--background);
}

.btn--solid:hover {
  background-color: var(--accent);
}

.btn--outline {
  border: 1px solid var(--fg-20);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.link-accent {
  color: var(--accent);
}

.link-accent:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   5. Home page
   -------------------------------------------------------------------------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.hero__copy {
  width: 100%;
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
}

.hero__copy h1 {
  font-size: 3rem;
  line-height: 1.05;
  text-wrap: balance;
}

.hero__copy p {
  font-size: 1.125rem;
  color: var(--fg-70);
  max-width: 28rem;
  line-height: 1.625;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 0.5rem;
}

.hero__media {
  width: 100%;
  padding: 1.5rem;
}

.hero__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* About — inverted band */
.about {
  padding: 6rem var(--pad-x);
  background-color: var(--foreground);
  color: var(--background);
}

.about__grid {
  display: grid;
  gap: 3rem;
  align-items: start;
}

.about__lead h2 {
  font-size: 2.25rem;
  line-height: 1.25;
  margin: 1.5rem 0 2rem;
  text-wrap: balance;
}

.about__lead p {
  color: var(--bg-70);
  line-height: 1.625;
  font-size: 1.125rem;
  max-width: 65ch;
}

.about__card {
  border: 1px solid var(--bg-15);
  padding: 2.5rem;
}

/* Inline (not block) so the label sits in a line box set by the parent's
   strut, matching the original's taller gap above the stat. */
.about__card .eyebrow {
  display: inline;
}

.about__stat {
  font-family: var(--font-serif);
  font-size: 3rem;
  line-height: 1;
  margin: 1.5rem 0 1rem;
}

.about__card p:last-child {
  color: var(--bg-60);
  font-size: 0.875rem;
  line-height: 1.625;
}

/* Category grid */
.collection {
  padding: 6rem var(--pad-x);
}

.collection__head {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.collection__head h2 {
  font-size: 2.25rem;
  line-height: 1.25;
}

.collection__head > div {
  max-width: 36rem;
}

.collection__head > div .eyebrow {
  margin-bottom: 1rem;
}

.collection__note {
  color: var(--fg-60);
  max-width: 24rem;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.card__frame {
  overflow: hidden;
  margin-bottom: 1.5rem;
  background-color: color-mix(in oklab, var(--secondary) 30%, transparent);
}

.card__frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.7s;
}

.card:hover .card__frame img {
  transform: scale(1.03);
}

.card h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 2rem;
  margin-bottom: 0.75rem;
}

.card p {
  font-size: 0.875rem;
  color: var(--fg-65);
  line-height: 1.625;
}

/* Visit */
.visit {
  padding: 6rem var(--pad-x);
  text-align: center;
}

.visit__inner {
  max-width: 48rem;
  margin-inline: auto;
}

.visit h2 {
  font-size: 2.25rem;
  line-height: 1.25;
  margin: 2rem 0;
  text-wrap: balance;
}

.visit__intro {
  color: var(--fg-65);
  line-height: 2;
  margin-bottom: 3rem;
  max-width: 42rem;
  margin-inline: auto;
}

.visit__photo {
  width: 100%;
  height: 18rem;
  object-fit: cover;
  margin-bottom: 3rem;
}

.details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  text-align: left;
  max-width: 48rem;
  margin-inline: auto;
}

.details h3 {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.details p {
  font-size: 0.875rem;
  line-height: 1.625;
}

.details a:hover {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   6. Footer
   -------------------------------------------------------------------------- */

.footer {
  background-color: color-mix(in oklab, var(--secondary) 20%, transparent);
  border-top: 1px solid var(--border);
  padding: 4rem var(--pad-x);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer__brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.footer__brand span {
  color: var(--accent);
}

.footer__about p {
  font-size: 0.875rem;
  color: var(--fg-60);
  max-width: 20rem;
  line-height: 1.625;
}

.footer__about p + p {
  margin-top: 0.75rem;
}

.footer__about a:hover {
  color: var(--accent);
}

.footer h4 {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.footer ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--fg-70);
}

.footer ul a:hover {
  color: var(--accent);
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--fg-50);
  text-align: center;
}

.footer__bottom a:hover {
  color: var(--accent);
}

/* Slim footer used on the gallery page — no divider, just the baseline row */
.footer--slim {
  padding-block: 3rem;
}

.footer--slim .footer__bottom {
  border-top: 0;
  padding-top: 0;
}

/* --------------------------------------------------------------------------
   7. Gallery page
   -------------------------------------------------------------------------- */

.page-head {
  padding: 5rem var(--pad-x);
  max-width: var(--wrap);
  margin-inline: auto;
}

/* Inline, so the label's line box takes the parent's strut — as in the original,
   where this span is not blockified by a flex parent. */
.page-head .eyebrow {
  display: inline;
}

.page-head h1 {
  font-size: 3rem;
  line-height: 1.05;
  margin-top: 1.5rem;
  text-wrap: balance;
}

.page-head p {
  font-size: 1.125rem;
  color: var(--fg-70);
  max-width: 36rem;
  margin-top: 1.5rem;
  line-height: 1.625;
}

.gallery {
  padding: 0 var(--pad-x) 6rem;
}

.gallery__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: var(--wrap);
  margin-inline: auto;
}

.plate {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.plate__frame {
  overflow: hidden;
  background-color: color-mix(in oklab, var(--secondary) 30%, transparent);
}

.plate__frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.7s;
}

.plate__frame:hover img {
  transform: scale(1.03);
}

.plate figcaption {
  font-size: 0.875rem;
  color: var(--fg-70);
  line-height: 1.625;
}

/* --------------------------------------------------------------------------
   8. Responsive
   -------------------------------------------------------------------------- */

@media (min-width: 640px) {
  .compliance p {
    font-size: 0.75rem;
    line-height: 1rem;
  }

  .details {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  :root {
    --pad-x: 3rem;
  }

  .nav__links {
    display: flex;
  }

  .nav__brand {
    font-size: 1.5rem;
    line-height: 2rem;
  }

  .hero {
    flex-direction: row;
  }

  .hero__copy,
  .hero__media {
    width: 50%;
  }

  .hero__copy {
    padding: 7rem 5rem;
  }

  .hero__copy h1 {
    font-size: 4.5rem;
  }

  .hero__media {
    padding: 2.5rem;
  }

  .about,
  .collection,
  .visit {
    padding-block: 8rem;
  }

  .about__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 4rem;
  }

  .about__lead {
    grid-column: span 7;
  }

  .about__card {
    grid-column: span 5;
  }

  .about__lead h2,
  .collection__head h2,
  .visit h2 {
    font-size: 3rem;
  }

  .about__stat {
    font-size: 3.75rem;
  }

  .collection__head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3rem;
  }

  .visit__photo {
    height: 24rem;
  }

  .footer__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .footer__about {
    grid-column: span 2;
  }

  .footer__bottom {
    flex-direction: row;
    text-align: initial;
  }

  .page-head {
    padding-block: 7rem;
  }

  .page-head h1 {
    font-size: 4.5rem;
  }

  .gallery {
    padding-bottom: 8rem;
  }

  .gallery__grid {
    gap: 2rem;
  }
}

@media (min-width: 1024px) {
  .hero__copy h1 {
    font-size: 6rem;
  }

  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
