/* Chosen Coffee Shop — landing page styles. Made by daan1k.xyz */

/* ---------- Fonts (self-hosted, SIL OFL) ---------- */
@font-face {
  font-family: "Allura";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("../fonts/allura-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Allura";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("../fonts/allura-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/figtree-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/figtree-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Metric-tuned fallback so text barely moves when Figtree arrives */
@font-face {
  font-family: "Figtree Fallback";
  src: local("Segoe UI"), local("Helvetica Neue"), local("Arial");
  size-adjust: 97%;
  ascent-override: 95%;
  descent-override: 25%;
}

/* ---------- Tokens ---------- */
:root {
  /* palette sampled from the shop's photos and logo */
  --oat: #EFE7DA;        /* page ground: the awning and walls */
  --cream: #F8F3EB;      /* panels, cups */
  --foam: #E3D5C1;       /* muted lines */
  --rose: #9D6862;       /* the logo colour */
  --rose-deep: #7F4F4A;
  --cocoa: #4A3730;      /* body text */
  --espresso: #2A1D17;   /* dark section */
  --espresso-2: #35261F;
  --ink: #17151A;        /* the floor tiles */
  --on-dark: #F3EAE0;
  --on-dark-muted: #C9B7A8;

  --font-script: "Allura", "Brush Script MT", cursive;
  --font-sans: "Figtree", "Figtree Fallback", system-ui, sans-serif;

  /* fluid type scale */
  --fs-hero: clamp(4.6rem, 3rem + 9.5vw, 11.5rem);
  --fs-script-2: clamp(2.9rem, 2rem + 3.6vw, 5.4rem);
  --fs-h2: clamp(1.6rem, 1.3rem + 1.2vw, 2.4rem);
  --fs-body: clamp(1rem, .95rem + .25vw, 1.125rem);
  --fs-small: .9rem;

  /* spacing */
  --gutter: clamp(1.1rem, .5rem + 3.5vw, 4rem);
  --section: clamp(4rem, 3rem + 6vw, 9rem);
  --radius: 22px;

  /* motion */
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --t-ui: 200ms;
  --t-hero: 1200ms;
  --t-image: 900ms;

  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--oat);
  color: var(--cocoa);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; border-radius: 4px; }

.script {
  font-family: var(--font-script);
  font-weight: 400;
  font-feature-settings: "liga" 1, "calt" 1;
  line-height: 1;
  letter-spacing: 0;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: .6rem 1rem; background: var(--espresso); color: var(--on-dark);
  border-radius: 999px; transition: top var(--t-ui) var(--ease-soft);
}
.skip:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.4rem;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 1rem; line-height: 1; text-decoration: none;
  transition: background-color var(--t-ui) var(--ease-soft), color var(--t-ui) var(--ease-soft),
              border-color var(--t-ui) var(--ease-soft), transform var(--t-ui) var(--ease-soft),
              box-shadow var(--t-ui) var(--ease-soft);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--espresso); color: var(--on-dark); box-shadow: 0 12px 28px -16px rgba(42,29,23,.6); }
.btn--primary:hover { background: var(--rose-deep); }
.btn--quiet { color: var(--cocoa); border-color: rgba(74,55,48,.28); background: transparent; }
.btn--quiet:hover { border-color: var(--cocoa); background: rgba(255,255,255,.35); }
.btn--light { background: var(--cream); color: var(--espresso); }
.btn--light:hover { background: #fff; }
.btn--ghost { color: var(--on-dark); border-color: rgba(243,234,224,.35); }
.btn--ghost:hover { border-color: var(--on-dark); background: rgba(255,255,255,.06); }

/* ---------- Liquid glass ---------- */
.glass {
  position: relative;
  isolation: isolate;
  background: rgba(248, 243, 235, .58);
  -webkit-backdrop-filter: blur(16px) saturate(1.45);
  backdrop-filter: blur(16px) saturate(1.45);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.75),
    inset 0 -1px 0 rgba(90,60,50,.06),
    0 14px 34px -22px rgba(42,29,23,.45);
}
/* fine reflective edge: a gradient hairline masked to the border */
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,255,255,.28) 35%, rgba(255,255,255,.08) 60%, rgba(255,255,255,.7));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none; z-index: -1;
}
/* soft highlight, top-left */
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(120% 90% at 12% 0%, rgba(255,255,255,.42), rgba(255,255,255,0) 55%);
  pointer-events: none; z-index: -1;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(248, 243, 235, .96); }
}
@media (prefers-reduced-transparency: reduce) {
  .glass { background: rgba(248, 243, 235, .97); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---------- Navigation ---------- */
.nav-wrap {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding: max(.75rem, env(safe-area-inset-top)) var(--gutter) 0;
  pointer-events: none;
}
.nav {
  pointer-events: auto;
  display: flex; align-items: center; gap: .25rem;
  width: max-content; max-width: 100%;
  padding: .35rem .45rem .35rem 1.05rem;
  border-radius: 999px;
}
.nav__brand {
  font-family: var(--font-script); font-size: 2rem; line-height: 1;
  color: var(--espresso); text-decoration: none;
  display: inline-flex; align-items: center; min-height: 40px;
  padding: 0 .55rem .2em 0;
}
.nav__links { display: flex; gap: .15rem; margin-left: .35rem; }
.nav__links a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 .8rem;
  border-radius: 999px; font-weight: 500; font-size: .95rem; text-decoration: none; color: var(--cocoa);
  transition: background-color var(--t-ui) var(--ease-soft), color var(--t-ui) var(--ease-soft);
}
.nav__links a:hover { background: rgba(255,255,255,.55); color: var(--espresso); }
.nav__cta {
  display: inline-flex; align-items: center; gap: .4rem;
  min-height: 40px; padding: 0 1rem 0 .8rem; margin-left: .4rem;
  border-radius: 999px; background: var(--espresso); color: var(--on-dark);
  font-weight: 600; font-size: .92rem; text-decoration: none;
  transition: background-color var(--t-ui) var(--ease-soft);
}
.nav__cta:hover { background: var(--rose-deep); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 46%);
  align-items: center;
  min-height: min(100svh, 940px);
  padding-left: var(--gutter);
}
.hero__text {
  position: relative; z-index: 2;
  padding: 7.5rem 0 4rem;
  max-width: 44rem;
}
.hero__kicker {
  font-size: var(--fs-small); font-weight: 500; letter-spacing: .01em;
  color: var(--rose-deep);
  margin-bottom: 1.2rem;
}
.hero__title {
  font-family: var(--font-script); font-weight: 400;
  font-size: var(--fs-hero); line-height: .92;
  color: var(--espresso);
  font-feature-settings: "liga" 1, "calt" 1;
  /* room for ascenders / flourishes so nothing clips */
  padding: .08em .2em .1em 0;
  margin: 0 -.2em .2em 0;
  white-space: nowrap;
}
.hero__line { display: block; }
.hero__line--2 { margin-left: 1.35em; color: var(--rose); }
.hero__intro {
  max-width: 30rem; font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem); line-height: 1.5;
  margin-bottom: 1.8rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }

.hero__media {
  position: relative; z-index: 1;
  align-self: stretch;
  height: 100%;
  min-height: 70vh;
  border-radius: 0 0 0 clamp(28px, 6vw, 84px);
  overflow: hidden;
  background: #483828; /* dominant colour of the photo, shown until it decodes */
}
.hero__media picture, .hero__media img { width: 100%; height: 100%; }
.hero__media img { object-fit: cover; object-position: 50% 40%; }

.hero__chip {
  position: absolute; left: clamp(1rem, 3vw, 2rem); bottom: clamp(1.2rem, 4vw, 2.4rem);
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .6rem 1rem .6rem .8rem; border-radius: 999px;
  font-size: .92rem; font-weight: 500; color: var(--espresso);
}
.hero__chip-dot {
  width: .55rem; height: .55rem; border-radius: 50%;
  background: #6AA36F; box-shadow: 0 0 0 3px rgba(106,163,111,.22);
}
.hero__chip.is-closed .hero__chip-dot { background: var(--rose); box-shadow: 0 0 0 3px rgba(157,104,98,.22); }

/* ---------- Gallery ---------- */
.gallery { padding: var(--section) var(--gutter) calc(var(--section) * .8); }
.gallery__head {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1rem 4rem; align-items: end;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.gallery__title { font-size: var(--fs-script-2); color: var(--espresso); padding: .1em .15em .1em 0; }
.gallery__lead { max-width: 30rem; color: var(--cocoa); }

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2.2rem);
  align-items: start;
}
.tile { position: relative; }
.tile__frame {
  overflow: hidden; border-radius: var(--radius); background: var(--foam);
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-image) var(--ease-out); }
@media (hover: hover) { .tile:hover img { transform: scale(1.035); } }
.tile figcaption { margin-top: .8rem; font-size: var(--fs-small); line-height: 1.5; color: var(--cocoa); max-width: 26rem; }
.tile figcaption strong { color: var(--espresso); font-weight: 600; }

/* an editorial, staggered composition rather than an even grid */
.tile--a { grid-column: 1 / span 5; }
.tile--b { grid-column: 7 / span 4; margin-top: clamp(2rem, 8vw, 7rem); }
.tile--c { grid-column: 2 / span 4; margin-top: clamp(1rem, 3vw, 3rem); }
.tile--d { grid-column: 8 / span 4; margin-top: clamp(3rem, 7vw, 7rem); }

/* ---------- Visit ---------- */
.visit {
  background: var(--espresso); color: var(--on-dark);
  padding: var(--section) var(--gutter);
}
.visit__inner {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: center;
  max-width: 78rem; margin: 0 auto;
}
.visit__media { border-radius: var(--radius); overflow: hidden; background: var(--espresso-2); }
.visit__media img { width: 100%; height: auto; }
.visit__accent { font-size: var(--fs-script-2); color: var(--on-dark-muted); padding: .1em .15em .05em 0; margin-bottom: .2rem; }
.visit__title { font-size: var(--fs-h2); font-weight: 600; letter-spacing: -.01em; margin-bottom: 1.8rem; color: #fff; }

.visit__details { display: grid; gap: 1.1rem; margin-bottom: 2rem; }
.visit__row {
  display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .5rem 1rem;
  padding-top: 1.1rem; border-top: 1px solid rgba(243,234,224,.14);
}
.visit__row dt { color: var(--on-dark-muted); font-size: var(--fs-small); font-weight: 500; padding-top: .15em; }
.visit__row dd a, .footer__line a, .footer__credit { display: inline-block; padding: .35em 0; margin: -.35em 0; }
.visit__row dd a { color: #fff; }
.visit__row dd a:hover { color: var(--on-dark-muted); }
.visit__note { display: block; font-size: var(--fs-small); color: var(--on-dark-muted); margin-top: .25rem; }
.visit__sep { color: var(--on-dark-muted); margin: 0 .35rem; }
.hours { border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours th { text-align: left; font-weight: 400; padding: 0 1.4rem .25rem 0; color: var(--on-dark); }
.hours td { padding: 0 0 .25rem; color: #fff; white-space: nowrap; }
.visit__actions { display: flex; flex-wrap: wrap; gap: .7rem; }

/* ---------- Footer ---------- */
.footer { background: var(--espresso); color: var(--on-dark-muted); }
.footer__tiles {
  height: 12px;
  background: repeating-conic-gradient(from 45deg, var(--ink) 0 25%, var(--cream) 0 50%) 0 0 / 12px 12px;
}
.footer__inner {
  padding: clamp(2.5rem, 5vw, 4rem) var(--gutter) clamp(1.8rem, 4vw, 2.6rem);
  display: grid; gap: 1rem;
  max-width: 78rem; margin: 0 auto;
}
.footer__brand { display: flex; align-items: baseline; gap: .8rem; }
.footer__word { font-size: 3.4rem; color: var(--on-dark); line-height: 1; padding-right: .1em; }
.footer__sub { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.footer__line { font-size: var(--fs-small); }
.footer__line a { color: var(--on-dark); }
.footer__meta {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem;
  margin-top: .6rem; padding-top: 1.1rem; border-top: 1px solid rgba(243,234,224,.14);
  font-size: var(--fs-small);
}
.footer__credit { color: var(--on-dark); font-weight: 600; }
.footer__credit:hover { color: var(--rose); }

/* ---------- Motion ---------- */
/* Hero entrance: one slow choreography on load. Applies only when JS ran, so the page stays visible without it. */
.js .hero__text > *, .js .hero__media, .js .hero__chip, .js .nav {
  animation-duration: var(--t-hero);
  animation-timing-function: var(--ease-out);
  animation-fill-mode: both;
}
.js .hero__media { animation-name: hero-photo; animation-duration: 1400ms; }
.js .hero__text > * { animation-name: rise; animation-duration: 1000ms; }
.js .hero__kicker { animation-delay: 120ms; }
.js .hero__title { animation-delay: 220ms; }
.js .hero__intro { animation-delay: 380ms; }
.js .hero__actions { animation-delay: 480ms; }
.js .nav { animation-name: nav-in; animation-duration: 900ms; animation-delay: 300ms; }
.js .hero__chip { animation-name: rise; animation-duration: 900ms; animation-delay: 900ms; }

@keyframes hero-photo {
  from { opacity: 0; transform: scale(1.045) translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
@keyframes nav-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: none; }
}

/* Decorative loop: the chip drifts very slowly. Paused by JS when offscreen or the tab is hidden. */
.js .hero__chip.is-floating { animation: rise 900ms var(--ease-out) 900ms both, drift 7s var(--ease-soft) 2100ms infinite; }
.js .hero__chip.is-paused { animation-play-state: running, paused; }
@keyframes drift {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -5px; }
}

/* Section reveals: once, on entering the viewport */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1100ms var(--ease-out), transform 1100ms var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .tile--b.reveal { transition-delay: 120ms; }
.js .tile--c.reveal { transition-delay: 60ms; }
.js .tile--d.reveal { transition-delay: 180ms; }
.js .visit__text.reveal { transition-delay: 150ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .hero__text > *, .js .hero__media, .js .hero__chip, .js .nav { animation: none !important; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .tile img { transition: none; }
  @media (hover: hover) { .tile:hover img { transform: none; } }
}

/* ---------- Responsive ---------- */
@media (max-width: 64em) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(320px, 44%); }
  .hero__line--2 { margin-left: .6em; }
}

@media (max-width: 47.9em) {
  .nav-wrap { padding-top: max(.6rem, env(safe-area-inset-top)); }
  .nav { padding-left: .9rem; }
  .nav__brand { font-size: 1.8rem; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    min-height: 0;
    padding-left: 0;
  }
  .hero__media {
    grid-row: 1;
    height: clamp(300px, 52svh, 520px);
    min-height: 0;
    border-radius: 0 0 clamp(28px, 9vw, 48px) 0;
  }
  .hero__media img { object-position: 50% 42%; }
  /* the chip moves up and right so it never sits under the headline */
  .hero__chip { left: auto; right: 1rem; bottom: auto; top: 4.4rem; }
  .hero__text {
    grid-row: 2;
    display: flex; flex-direction: column;
    padding: 0 var(--gutter) 3rem;
    max-width: none;
  }
  .hero__title {
    order: -1;
    /* the script overlaps the photo's bottom edge for a little asymmetry */
    margin-top: -.72em;
    margin-bottom: .1em;
    font-size: clamp(4rem, 2.2rem + 12vw, 6.4rem);
    line-height: .9;
    padding-top: .12em;
  }
  .hero__line--2 { margin-left: .8em; }
  /* on phones: headline, then the location line, then the action, then the intro */
  .hero__kicker { order: 0; margin-bottom: 1rem; }
  .hero__actions { order: 1; margin-bottom: 1.2rem; }
  .hero__intro { order: 2; margin-bottom: 0; font-size: 1.05rem; }

  .gallery__head { grid-template-columns: 1fr; gap: .8rem; }
  .gallery__grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .tile--a { grid-column: 1 / -1; margin: 0; }
  .tile--b { grid-column: 1; margin: 0; }
  .tile--c { grid-column: 2; margin-top: 2.2rem; }
  .tile--d { grid-column: 1 / -1; margin: 0; }
  .tile--d .tile__frame { aspect-ratio: 4 / 3; }
  .tile--d img { height: 100%; object-position: 50% 60%; }

  .visit__inner { grid-template-columns: 1fr; }
  .visit__row { grid-template-columns: 5.6rem minmax(0, 1fr); }
}

@media (max-width: 30em) {
  .nav__links { display: none; }
  .nav__cta span { display: none; }
  .nav__cta { padding: 0; width: 40px; justify-content: center; }
  .hero__title { margin-top: -.6em; }
  .hero__chip { top: 4rem; font-size: .85rem; }
  .hero__actions .btn { flex: 1 1 auto; }
  .gallery__grid { grid-template-columns: 1fr; }
  .tile--b, .tile--c { grid-column: 1; margin: 0; }
  .visit__row { grid-template-columns: 1fr; gap: .2rem; }
}

/* very short viewports (landscape phones): keep the first screen intact */
@media (max-height: 30em) and (max-width: 47.9em) {
  .hero__media { height: 52svh; }
}
