/* ==========================================================================
   Anyday Twist Cafe: shared styles (both pages)
   1 Fonts + tokens   2 Base   3 Buttons   4 Glass   5 Header   6 Footer + FAB
   ========================================================================== */

/* 1. Fonts + tokens ------------------------------------------------------ */
@font-face {
  font-family: "Bricolage Grotesque Variable"; font-style: normal; font-display: swap;
  font-weight: 200 800; font-stretch: 75% 100%;
  src: url("../assets/fonts/bricolage-grotesque-latin-ext-standard-normal.woff2") format("woff2-variations");
  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: "Bricolage Grotesque Variable"; font-style: normal; font-display: swap;
  font-weight: 200 800; font-stretch: 75% 100%;
  src: url("../assets/fonts/bricolage-grotesque-latin-standard-normal.woff2") format("woff2-variations");
  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: "Newsreader Variable"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../assets/fonts/newsreader-latin-ext-wght-normal.woff2") format("woff2-variations");
  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: "Newsreader Variable"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../assets/fonts/newsreader-latin-wght-normal.woff2") format("woff2-variations");
  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;
}

:root {
  /* Brand palette (client's reference colours) */
  --roast: #38231C;
  --roast-deep: #1B0F0A;
  --caramel: #C9A061;
  --crumb: #F7F1E9;
  --white: #FFFFFF;
  --ember: #F29A3D;

  --on-dark: #F7F1E9;
  --on-dark-muted: rgba(247, 241, 233, 0.78);
  --on-light: #38231C;
  --on-light-muted: rgba(56, 35, 28, 0.76);

  --font: "Bricolage Grotesque Variable", "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader Variable", "Newsreader", "Bricolage Grotesque Variable", Georgia, serif;

  --wrap: 1240px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-pad: clamp(4.5rem, 9vw, 8rem);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* 2. Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.6;
  color: var(--on-dark); background: var(--roast-deep);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { background: linear-gradient(135deg, #4A2C22, #2A1812); } /* shows while a photo loads */
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--caramel); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: 0.7rem 1.1rem; border-radius: 999px; background: var(--caramel); color: var(--roast-deep); font-weight: 600; text-decoration: none; }
.skip:focus { top: 1rem; }
.icon { width: 1.25rem; height: 1.25rem; flex: none; }
.star { color: var(--caramel); }

/* Fine film grain over the whole page so flat colour never looks digital */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 200; pointer-events: none; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* 3. Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3rem; padding: 0.8rem 1.5rem; border: 1.5px solid transparent; border-radius: 999px;
  font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--sm { min-height: 2.5rem; padding: 0.55rem 1.15rem; font-size: 0.95rem; }
.btn--block { width: 100%; }
.btn--gold { background: var(--caramel); color: var(--roast-deep); box-shadow: 0 10px 30px rgba(242, 154, 61, 0.3); }
.btn--gold:hover { background: #D8B073; box-shadow: 0 14px 38px rgba(242, 154, 61, 0.45); }
.btn--glass { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.3); color: var(--on-dark); backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%); }
.btn--glass:hover { background: rgba(255, 255, 255, 0.22); }
.btn--roast { background: var(--roast); color: var(--crumb); }
.btn--roast:hover { background: var(--roast-deep); box-shadow: 0 12px 28px rgba(56, 35, 28, 0.3); }
.btn--outline { border-color: rgba(56, 35, 28, 0.38); color: var(--roast); background: transparent; }
.btn--outline:hover { background: rgba(56, 35, 28, 0.07); border-color: var(--roast); }
.textlink { font-weight: 600; text-decoration: underline; text-decoration-color: var(--caramel); text-decoration-thickness: 2px; text-underline-offset: 0.3em; padding: 0.5rem 0.25rem; }
.textlink:hover { text-decoration-color: currentColor; }

/* 4. Glass ---------------------------------------------------------------
   Real frosted glass: blur + saturation of whatever photo sits behind it,
   a bright top edge, and a soft light that follows the pointer (set in main.js). */
.glass {
  position: relative; isolation: isolate;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 44px rgba(255, 255, 255, 0.05), 0 26px 60px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
}
.glass::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0.5;
  background: radial-gradient(340px circle at var(--mx, 30%) var(--my, 0%), rgba(255, 255, 255, 0.24), transparent 62%);
  transition: opacity 0.35s;
}
.glass:hover::before { opacity: 1; }
.glass--dark { background: linear-gradient(145deg, rgba(27, 15, 10, 0.62), rgba(27, 15, 10, 0.36)); }
.glass--light {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.5));
  border-color: rgba(56, 35, 28, 0.1);
  box-shadow: inset 0 1px 0 #fff, 0 24px 60px rgba(56, 35, 28, 0.16);
  color: var(--on-light);
}
.glass--light::before { background: radial-gradient(340px circle at var(--mx, 30%) var(--my, 0%), rgba(255, 255, 255, 0.9), transparent 62%); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(60, 38, 30, 0.9); }
  .glass--light { background: rgba(255, 255, 255, 0.92); }
}

/* 5. Header: a floating glass pill --------------------------------------- */
.nav { position: fixed; z-index: 60; top: 0.9rem; left: 50%; transform: translateX(-50%); width: min(1180px, calc(100% - 1.5rem)); }
.nav__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1.25rem;
  min-height: 3.75rem; padding: 0.4rem 0.5rem 0.4rem 1.25rem; border-radius: 999px;
  background: rgba(27, 15, 10, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 18px 44px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(22px) saturate(170%); -webkit-backdrop-filter: blur(22px) saturate(170%);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--on-dark); }
.brand__mark { width: 1.9rem; height: 1.9rem; color: var(--caramel); }
.brand__name { font-size: 1.25rem; font-weight: 750; font-stretch: 85%; letter-spacing: -0.01em; }

.nav__links { display: flex; align-items: center; gap: clamp(0.9rem, 2.2vw, 1.75rem); }
.nav__links a:not(.btn) { position: relative; padding: 0.4rem 0.1rem; text-decoration: none; font-weight: 500; color: var(--on-dark-muted); transition: color 0.2s; }
.nav__links a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--caramel); transform: scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease); }
.nav__links a:not(.btn):hover, .nav__links a.is-current { color: var(--on-dark); }
.nav__links a:not(.btn):hover::after, .nav__links a.is-current::after { transform: scaleX(1); }

.nav__toggle { display: none; position: relative; flex: none; width: 2.9rem; height: 2.9rem; border: 1px solid rgba(255, 255, 255, 0.24); border-radius: 50%; background: rgba(255, 255, 255, 0.08); cursor: pointer; }
.nav__toggle span { position: absolute; left: 50%; width: 1.1rem; height: 2px; margin-left: -0.55rem; background: var(--on-dark); border-radius: 2px; transition: transform 0.25s var(--ease), top 0.25s var(--ease); }
.nav__toggle span:nth-child(1) { top: calc(50% - 4px); }
.nav__toggle span:nth-child(2) { top: calc(50% + 3px); }
.nav.is-open .nav__toggle span:nth-child(1) { top: calc(50% - 1px); transform: rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { top: calc(50% - 1px); transform: rotate(-45deg); }

/* 6. Footer + floating order button -------------------------------------- */
.footer { background: var(--roast-deep); padding-block: 2.75rem; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.footer__links a { padding: 0.4rem 0; color: var(--on-dark-muted); text-decoration: none; }
.footer__links a:hover { color: var(--on-dark); text-decoration: underline; text-decoration-color: var(--caramel); text-underline-offset: 0.3em; }
.footer__legal { flex-basis: 100%; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.9rem; color: var(--on-dark-muted); }
.footer__legal a { text-underline-offset: 0.25em; }

.fab { display: none; position: fixed; right: 1rem; bottom: 1rem; z-index: 55; align-items: center; gap: 0.5rem; min-height: 3.25rem; padding: 0.75rem 1.2rem; border-radius: 999px; background: var(--caramel); color: var(--roast-deep); font-weight: 650; text-decoration: none; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); }

@media (max-width: 920px) {
  .nav__toggle { display: block; }
  .nav__links { display: none; }
  .nav__bar { padding-right: 0.4rem; }
  .nav.is-open .nav__bar { border-radius: 28px 28px 0 0; }
  .nav.is-open .nav__links {
    display: flex; flex-direction: column; align-items: stretch; gap: 0.2rem;
    position: absolute; top: 100%; left: 0; right: 0; padding: 0.5rem 1.25rem 1.4rem;
    border-radius: 0 0 28px 28px; background: rgba(27, 15, 10, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.16); border-top: 0;
    backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  }
  .nav.is-open .nav__links a:not(.btn) { padding: 0.8rem 0; font-size: 1.15rem; }
  .nav.is-open .nav__links a:not(.btn)::after { display: none; }
  .nav.is-open .nav__cta { margin-top: 0.75rem; }
  .fab { display: inline-flex; }
  .footer { padding-bottom: 5.5rem; }
}

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