/* Filxhani - café concept. Cobalt and crema; the cup is the clock. */

:root {
  --kobalt: #1A3BC4;
  --kobalt-deep: #12298C;
  --crema: #F2D49F;
  --espresso: #1E110A;
  --paper: #FFFFFF;
  --sand: #F3EEE6;
  --muted: #5E534B;

  --display: 'Archivo', system-ui, sans-serif;
  --body: 'Archivo', system-ui, sans-serif;
  --mono: 'Martian Mono', ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1360px;
  --radius: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--espresso);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  font-variation-settings: 'wdth' 100;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--crema); outline-offset: 3px; border-radius: 4px; }
.about :focus-visible, .gallery :focus-visible { outline-color: var(--kobalt); }

/* ---------- nav ---------- */
.nav {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px var(--gutter);
  color: var(--crema);
}
.nav-mark {
  font-family: var(--display); font-weight: 800; font-variation-settings: 'wdth' 125;
  font-size: 20px; letter-spacing: -.01em; text-decoration: none; text-transform: uppercase;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; opacity: .9;
}
.nav-links a:hover { text-decoration: underline; text-underline-offset: 6px; }
.lang { display: flex; border: 1.5px solid var(--crema); border-radius: 999px; padding: 3px; }
.lang button {
  font: 600 12px/1 var(--mono); letter-spacing: .06em; color: var(--crema);
  background: none; border: 0; border-radius: 999px; padding: 8px 12px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--crema); color: var(--kobalt-deep); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--kobalt);
  color: var(--crema);
  min-height: max(100svh, 720px);
  padding: 112px var(--gutter) 56px;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  column-gap: clamp(24px, 4vw, 72px);
}
.hero-copy { display: flex; flex-direction: column; min-width: 0; }
.hero-kicker {
  margin: 0 0 18px;
  font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
}
/* The size is set by script to fill the column; this is the no-JS fallback. */
.hero-name {
  margin: 0 0 clamp(28px, 3vw, 44px);
  font-family: var(--display); font-weight: 900; font-variation-settings: 'wdth' 125;
  text-transform: uppercase;
  font-size: clamp(56px, 9vw, 150px);
  line-height: .82; letter-spacing: -.035em;
}
.hero-name-line { display: block; white-space: nowrap; width: max-content; }

.cup {
  position: relative; margin: 0; justify-self: center;
  width: min(100%, calc(100svh - 230px), 600px); aspect-ratio: 1;
}
.cup-photo {
  position: absolute; inset: 13%; width: 74%; height: 74%;
  object-fit: cover; border-radius: 50%;
  box-shadow: 0 0 0 10px var(--kobalt), 0 0 0 11px rgba(242, 212, 159, .35), 0 30px 60px rgba(0, 0, 0, .35);
}
.dial { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; overflow: visible; }
.dial-ticks line { stroke: var(--crema); stroke-width: 1.5; opacity: .55; }
.dial-ticks line.major { stroke-width: 3; opacity: 1; }
.dial-ticks text {
  fill: var(--crema); font-family: var(--mono); font-size: 13px; font-weight: 500;
  text-anchor: middle; dominant-baseline: central;
}
.dial-track { stroke: var(--crema); stroke-width: 14; opacity: .14; }
.dial-open {
  fill: none; stroke: var(--crema); stroke-width: 14; stroke-linecap: round;
}
.dial-now > circle { fill: var(--paper); stroke: var(--kobalt); stroke-width: 4; }
.dial-now-tag rect { fill: var(--paper); filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .25)); }
.dial-now-tag text {
  fill: var(--kobalt-deep); font-family: var(--mono); font-size: 13px; font-weight: 600;
  text-anchor: middle; dominant-baseline: central;
}
.dial-ticks text.is-hidden { opacity: 0; }
.is-closed .dial-now > circle { fill: var(--kobalt); stroke: var(--crema); }

.hero-foot { max-width: 540px; }
.hero-tagline {
  margin: 0 0 22px;
  font-family: var(--display); font-weight: 500; font-variation-settings: 'wdth' 100;
  font-size: clamp(22px, 2vw, 30px); line-height: 1.25; letter-spacing: -.01em;
  text-wrap: balance;
}
.status {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px;
  font-family: var(--mono); font-size: 13px; letter-spacing: .02em;
}
.status-dot { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--crema); flex: none; }
.is-open .status-dot::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--crema);
  animation: pulse 2.4s cubic-bezier(.2, .7, .2, 1) infinite;
}
.is-closed .status-dot { background: transparent; border: 2px solid var(--crema); }
@keyframes pulse { from { scale: 1; opacity: .9; } to { scale: 2.6; opacity: 0; } }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font-family: var(--display); font-weight: 700; font-variation-settings: 'wdth' 112;
  font-size: 16px; text-decoration: none; transition: transform .2s, background-color .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: var(--crema); color: var(--kobalt-deep); }
.btn-line { border: 1.5px solid var(--crema); color: var(--crema); }
.btn-line:hover { background: var(--crema); color: var(--kobalt-deep); }

.photo-note {
  position: absolute; right: var(--gutter); bottom: 20px; margin: 0;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .02em; opacity: .8;
}

/* ---------- shared ---------- */
.eyebrow {
  margin: 0 0 28px;
  font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }

/* ---------- about ---------- */
.about {
  padding: clamp(96px, 12vw, 176px) var(--gutter) clamp(72px, 9vw, 120px);
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); column-gap: clamp(32px, 5vw, 80px);
  align-items: end;
}
.about .eyebrow { grid-column: 1 / -1; }
.about .eyebrow { color: var(--kobalt); }
.about-lead {
  margin: 0; max-width: 22ch;
  font-family: var(--display); font-weight: 600; font-variation-settings: 'wdth' 108;
  font-size: clamp(32px, 4.6vw, 68px); line-height: 1.05; letter-spacing: -.025em;
  text-wrap: balance;
}
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-end; }
.chips li {
  padding: 10px 18px; border-radius: 999px; background: var(--sand);
  font-size: 15px; font-weight: 500;
}

/* ---------- gallery ---------- */
.gallery { padding: 0 var(--gutter) clamp(80px, 10vw, 140px); max-width: var(--max); margin: 0 auto; }
.gallery .eyebrow { color: var(--kobalt); }
.gallery-track {
  display: grid; gap: 16px;
  grid-template-columns: 1.15fr .85fr 1fr;
  grid-template-rows: 300px 260px;
}
.tile { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--sand); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.tile:hover img { transform: scale(1.04); }
.tile-a { grid-row: 1 / 3; }
.tile-b { grid-column: 2 / 4; }
.tile figcaption {
  position: absolute; left: 12px; bottom: 12px; max-width: calc(100% - 24px);
  padding: 5px 10px; border-radius: 999px;
  background: rgba(30, 17, 10, .72); color: var(--paper);
  font-family: var(--mono); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- rating ---------- */
.rating { background: var(--espresso); color: var(--crema); padding: clamp(72px, 9vw, 128px) var(--gutter); }
.rating > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.rating-grid { display: grid; grid-template-columns: auto minmax(0, 520px); gap: clamp(32px, 6vw, 96px); align-items: end; }
.rating-score {
  margin: 0; line-height: .78;
  font-family: var(--display); font-weight: 900; font-variation-settings: 'wdth' 125;
  letter-spacing: -.04em;
}
.rating-num { font-size: clamp(120px, 20vw, 300px); }
.rating-of { font-size: clamp(32px, 4vw, 56px); margin-left: .1em; opacity: .55; letter-spacing: 0; }
.rating-count { margin: 0 0 20px; font-family: var(--display); font-weight: 600; font-size: 26px; font-variation-settings: 'wdth' 108; }
.bars { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 8px; }
.bars li { display: grid; grid-template-columns: 14px 1fr 40px; gap: 14px; align-items: center; font-family: var(--mono); font-size: 12px; }
.bars i { display: block; height: 8px; border-radius: 99px; background: rgba(242, 212, 159, .14); position: relative; overflow: hidden; }
.bars i::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--crema);
  transform-origin: left; transform: scaleX(var(--n));
  transition: transform 1.2s cubic-bezier(.2, .7, .2, 1);
}
.js .rating:not(.is-seen) .bars i::after { transform: scaleX(0); }
.bars b { font-weight: 400; text-align: right; opacity: .75; }
.link { font-family: var(--mono); font-size: 13px; text-underline-offset: 5px; }

/* ---------- visit ---------- */
.visit {
  background: var(--kobalt); color: var(--crema);
  padding: clamp(72px, 9vw, 128px) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px);
}
.visit > * { min-width: 0; }
.week { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 15px; }
.week th, .week td { padding: 14px 0; border-bottom: 1px solid rgba(242, 212, 159, .3); font-weight: 400; }
.week th { text-align: left; font-family: var(--body); font-size: 17px; }
.week td { text-align: right; font-variant-numeric: tabular-nums; }
.week tr.is-today th, .week tr.is-today td { font-weight: 700; }
.week tr.is-today th .day::after {
  content: attr(data-today); margin-left: -2px; padding: 3px 9px; border-radius: 99px;
  background: var(--crema); color: var(--kobalt-deep);
  font-family: var(--mono); font-size: 11px; font-weight: 600; vertical-align: 2px;
}
.addr {
  font-style: normal; margin: 0 0 24px;
  font-family: var(--display); font-weight: 700; font-variation-settings: 'wdth' 115;
  font-size: clamp(26px, 3vw, 40px); line-height: 1.1; letter-spacing: -.015em;
}
.map { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: var(--kobalt-deep); margin-bottom: 24px; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; filter: grayscale(.3) contrast(1.05); }

/* ---------- footer ---------- */
.foot { padding: 56px var(--gutter) 0; background: var(--paper); color: var(--muted); font-size: 14px; overflow: hidden; }
.foot-notes p { margin: 0 0 6px; max-width: 70ch; }
.foot-mark {
  margin: 40px 0 0; color: var(--kobalt);
  font-family: var(--display); font-weight: 900; font-variation-settings: 'wdth' 125;
  text-transform: uppercase; white-space: nowrap; line-height: .74; letter-spacing: -.04em;
  font-size: 13vw; width: max-content; translate: -.03em .1em;
}

/* ---------- mobile dock ---------- */
.dock { display: none; }

/* ---------- load choreography ---------- */
.js .hero-name-line { clip-path: inset(-30% -10% 100% -10%); translate: 0 .25em; }
.js .is-ready .hero-name-line { clip-path: inset(-30% -10% -30% -10%); translate: 0 0; transition: clip-path .9s cubic-bezier(.2, .8, .2, 1), translate .9s cubic-bezier(.2, .8, .2, 1); }
.js .is-ready .hero-name-line:last-child { transition-delay: .12s; }
.js .cup-photo { scale: .85; opacity: 0; }
.js .is-ready .cup-photo { scale: 1; opacity: 1; transition: scale 1.2s cubic-bezier(.2, .8, .2, 1) .25s, opacity .6s ease .25s; }
.js .hero-foot { opacity: 0; translate: 0 16px; }
.js .is-ready .hero-foot { opacity: 1; translate: 0 0; transition: opacity .8s ease .6s, translate .8s cubic-bezier(.2, .8, .2, 1) .6s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .hero-name-line, .js .cup-photo, .js .hero-foot { clip-path: none; translate: none; scale: none; opacity: 1; }
  .js .rating:not(.is-seen) .bars i::after { transform: scaleX(var(--n)); }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  body { padding-bottom: 76px; }
  .nav-links { display: none; }
  .hero {
    grid-template-columns: minmax(0, 1fr); padding-top: 96px; padding-bottom: 48px; min-height: 0;
  }
  .hero-copy { display: contents; }
  .hero-kicker { order: 1; }
  .hero-name { order: 2; margin-bottom: 0; }
  .cup { order: 3; width: min(84vw, 440px); margin: 44px 0 64px; }
  .hero-foot { order: 4; }
  .photo-note { right: auto; left: var(--gutter); bottom: 16px; }
  .dock { translate: 0 calc(100% + 24px); transition: translate .35s cubic-bezier(.2, .8, .2, 1); }
  .dock.is-shown { translate: 0 0; }
  .gallery-track {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px;
    margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); scrollbar-width: none;
  }
  .gallery-track::-webkit-scrollbar { display: none; }
  .tile { flex: 0 0 78%; aspect-ratio: 4 / 5; scroll-snap-align: center; }
  .rating-grid { grid-template-columns: 1fr; }
  .visit { grid-template-columns: 1fr; }
  .about { grid-template-columns: minmax(0, 1fr); }
  .foot-mark { translate: -.03em 0; margin-bottom: 20px; }
  .chips { margin-top: 36px; }
  .dock {
    position: fixed; z-index: 20; left: 12px; right: 12px; bottom: 12px;
    display: grid; grid-template-columns: repeat(3, 1fr);
    background: var(--espresso); border-radius: 999px; padding: 6px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
  }
  .dock a {
    min-height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 999px;
    color: var(--crema); text-decoration: none; font-weight: 700; font-size: 15px; font-variation-settings: 'wdth' 110;
  }
  .dock a:first-child { background: var(--crema); color: var(--espresso); }
}

/* ---------- week rings ---------- */
.week th > .day { display: flex; align-items: center; gap: 14px; }
.mini { width: 34px; height: 34px; flex: none; overflow: visible; }
.mini-track { fill: none; stroke: currentColor; stroke-width: 34; opacity: .18; }
.mini-open, .mini-over { fill: none; stroke: currentColor; stroke-width: 44; stroke-linecap: round; }
.mini-over { opacity: .5; }
.mini-noon { stroke: currentColor; stroke-width: 30; stroke-linecap: round; }
.week tr.is-today .mini-track { opacity: .35; }
.week tr.is-today .mini-open, .week tr.is-today .mini-over { stroke-width: 56; }

/* ---------- ink-in paragraph ---------- */
.ink .about-lead { view-timeline-name: --lead; }
.ink .about-lead .w { animation: ink linear both; animation-timeline: --lead; }
@keyframes ink { from { color: color-mix(in srgb, var(--espresso) 18%, var(--paper)); } to { color: var(--espresso); } }
