/* insane — "a day at insane". The homepage follows the clock in Madrid.
   Three moods on <html data-mood>: morning (mise en place), lunch (the rush), evening (after hours). */

html[data-mood="lunch"] { --eq-speed: 520ms; --eq-amp: .8; }
html[data-mood="morning"] { --eq-speed: 900ms; --eq-amp: .45; }
html { --eq-speed: 900ms; --eq-amp: .45; }
.nav { transition: transform var(--t-slow) var(--ease), box-shadow var(--t), background 900ms var(--ease-io); }
[data-mood="evening"] .nav__burger span:not(.sr) { background: var(--fg); }
[data-mood="evening"] .menu { background: var(--bg); }

/* ---------- the day hero ---------- */
.day-hero { position: relative; padding: 104px 0 40px; min-height: 100svh; display: flex; overflow: hidden; isolation: isolate; }
.day-hero__inner { display: flex; flex-direction: column; gap: clamp(28px, 3.4vw, 56px); justify-content: space-between; }
.day-hero__top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 15px; }
.kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--fg-2); }
.kicker b { color: var(--fg); font-weight: 500; font-variant-numeric: tabular-nums; }
.kicker .k-mood { color: var(--pomelo); }

.playing { display: inline-flex; align-items: center; gap: 12px; color: var(--fg-2); }
.eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; }
.eq i { width: 3px; height: 100%; background: var(--pomelo); transform-origin: bottom; animation: eq var(--eq-speed) ease-in-out infinite alternate; transform: scaleY(calc(.25 + var(--eq-amp) * .3)); }
.eq i:nth-child(2) { animation-delay: -.2s; animation-duration: calc(var(--eq-speed) * .8); }
.eq i:nth-child(3) { animation-delay: -.45s; animation-duration: calc(var(--eq-speed) * 1.15); }
.eq i:nth-child(4) { animation-delay: -.1s; animation-duration: calc(var(--eq-speed) * .9); }
.eq i:nth-child(5) { animation-delay: -.6s; animation-duration: calc(var(--eq-speed) * 1.3); }
@keyframes eq { from { transform: scaleY(.15); } to { transform: scaleY(calc(.2 + var(--eq-amp) * .8)); } }

.day-stage { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 16px; row-gap: clamp(12px, 2vw, 28px); align-items: start; }
.day-title { grid-column: 1 / 7; grid-row: 1; align-self: end; font-size: clamp(34px, 4.6vw, 72px); font-weight: 500; line-height: .98; letter-spacing: -0.045em; min-height: 2em; }
.day-title em { color: var(--pomelo); }
.day-sub { grid-column: 7 / 10; grid-row: 1; align-self: end; font-size: clamp(15px, 1.15vw, 18px); color: var(--fg-2); max-width: 40ch; min-height: 4.4em; }
.day-mark { grid-column: 1 / 11; grid-row: 2; width: 100%; height: auto; aspect-ratio: 1414 / 386; color: var(--pomelo); position: relative; z-index: 2; pointer-events: none; transition: filter 900ms var(--ease-io); }
.day-media { grid-column: 10 / 13; grid-row: 1 / 3; align-self: end; position: relative; z-index: 1; margin-bottom: 3.6vw; }
.day-frame { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; padding: 0; border: 0; background: var(--graphite); overflow: hidden; cursor: pointer; }
.day-frame > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; clip-path: inset(100% 0 0 0); transition: clip-path 800ms var(--ease-io), transform 1400ms var(--ease), filter 900ms var(--ease-io); transform: scale(1.08); }
.day-frame > .is-on { clip-path: inset(0); transform: scale(1); z-index: 2; }
.day-frame > .is-out { clip-path: inset(0); transform: scale(1); z-index: 1; }
.day-frame:hover > .is-on { transform: scale(1.03); }
[data-mood="evening"] .day-frame > * { filter: brightness(.86) saturate(1.1); }

.scene { display: flex; flex-wrap: wrap; gap: 8px; }
.scene li { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.scene li svg { width: 14px; height: 14px; color: var(--pomelo); --nope-bar: var(--bg); }

/* the day dial */
.dial { display: grid; gap: 10px; }
.dial__zones { display: grid; grid-template-columns: 24fr 30fr 46fr; gap: 4px; }
.dial__zone { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; min-height: 44px; padding: 0 2px; border: 0; border-bottom: 2px solid var(--line); background: none; cursor: pointer; text-align: left; font-weight: 500; transition: border-color var(--t), color var(--t); }
.dial__zone small { color: var(--fg-2); font-weight: 400; font-size: 13px; font-variant-numeric: tabular-nums; }
.dial__zone[aria-pressed="true"] { border-color: var(--pomelo); color: var(--pomelo); }
.dial__zone:hover { border-color: var(--fg); }
.dial__track { position: relative; height: 44px; }
.dial__track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.dial__ticks { position: absolute; inset: 0; display: flex; justify-content: space-between; pointer-events: none; }
.dial__ticks i { width: 1px; height: 8px; margin-top: 18px; background: var(--fg-2); opacity: .5; }
.dial__range { -webkit-appearance: none; appearance: none; position: absolute; inset: 0; width: 100%; height: 44px; margin: 0; background: transparent; cursor: grab; }
.dial__range:active { cursor: grabbing; }
.dial__range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--pomelo); border: 0; box-shadow: 0 0 0 6px color-mix(in srgb, var(--pomelo) 18%, transparent); transition: box-shadow var(--t); }
.dial__range::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--pomelo); border: 0; box-shadow: 0 0 0 6px rgba(254,72,32,.18); }
.dial__range:hover::-webkit-slider-thumb, .dial__range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 10px rgba(254,72,32,.22); }
[data-mood="evening"] .dial__range::-webkit-slider-thumb { box-shadow: 0 0 0 6px rgba(254,72,32,.25), 0 0 28px 6px rgba(254,72,32,.55); }
.dial__range:focus-visible { outline: none; }
.dial__time { position: absolute; top: -14px; transform: translateX(-50%); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; pointer-events: none; white-space: nowrap; }
.dial__foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--fg-2); }
.dial__foot b { color: var(--fg); font-weight: 500; }
.hint { display: inline-flex; align-items: center; gap: 8px; }
.hint .dot { flex: none; }

/* text swap */
.swap-in { animation: swap 700ms var(--ease) both; }
@keyframes swap { from { opacity: 0; transform: translateY(12px); filter: blur(4px); } }

/* ---------- a day at insane: three chapters ---------- */
.ch { padding: var(--sec) 0; position: relative; }
.ch + .ch { border-top: 1px solid var(--line); }
.ch__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 88px); align-items: start; }
.ch__copy { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 96px; }
.ch__copy .ch__time { font-size: clamp(56px, 8vw, 128px); font-weight: 500; letter-spacing: -0.06em; line-height: .85; font-variant-numeric: tabular-nums; color: var(--pomelo); }
.ch__copy p { font-size: 18px; color: var(--fg-2); max-width: 40ch; }
.ch__copy .ill { width: 120px; transition: transform var(--t-slow) var(--spring); }
.ch__copy .ill:hover { transform: rotate(-8deg); }
[data-mood="evening"] .ill, [data-mood="evening"] .list__ill { filter: invert(1); }
.ch__pics { display: grid; grid-template-columns: 7fr 5fr; gap: 12px; }
.ch__pics .pic { aspect-ratio: 4 / 5; }
.ch__pics .pic--wide { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.ch__pics .pic--tall { grid-row: span 2; aspect-ratio: auto; }
.ch__aside { border-top: 1px solid var(--fg); padding-top: 16px; display: grid; gap: 12px; }
.ch__aside h3 { font-size: clamp(20px, 1.8vw, 26px); font-weight: 500; letter-spacing: -0.03em; }
.ch__aside p { font-size: 16px; }
.crate-line { font-size: 18px; color: var(--fg); }
.crate-line b { color: var(--pomelo); font-weight: 500; }
.ch__copy .prohibido, .prohibido { display: inline-flex; align-items: center; gap: 12px; font-family: var(--serif); font-style: italic; font-size: clamp(26px, 2.6vw, 40px); color: var(--pomelo); }
.prohibido svg { width: 40px; height: 40px; color: var(--pomelo); --nope-bar: var(--bg); transition: transform 900ms var(--spring); }
.prohibido:hover svg { transform: rotate(180deg); }

/* responsive */
@media (max-width: 900px) {
  .day-hero { min-height: auto; padding-top: 80px; }
  .day-stage { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .day-title, .day-sub, .day-mark { grid-column: 1 / -1; }
  .day-sub { grid-row: 2; }
  .day-mark { grid-row: 3; }
  .day-media { grid-column: 2 / -1; grid-row: 4; margin: -8vw 0 0; }
    .day-frame { cursor: pointer; }
  .dial__zone small { display: none; }
  .ch__grid { grid-template-columns: 1fr; }
  .ch__copy { position: static; }
}
@media (max-width: 560px) {
  .day-hero__top { font-size: 14px; }
  .dial__zones { grid-template-columns: 1fr 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .eq i { animation: none !important; }
}

.asks--plain { border-top: 1px solid var(--fg); }
.asks--plain li { padding: 12px 0; font-size: clamp(20px, 2vw, 28px); }

/* ---------- split-flap clock: mid-century, black and white ---------- */
.day-clock { grid-column: 7 / 10; grid-row: 1; align-self: end; justify-self: start; display: grid; gap: 10px; }
.flipclock { display: flex; align-items: center; gap: .07em; font-size: clamp(38px, 3.9vw, 64px); font-weight: 600; letter-spacing: 0; font-variant-numeric: tabular-nums; line-height: 1; }
.fc-unit { --fh: 1.12em; position: relative; width: .66em; height: var(--fh); perspective: 4em; border-radius: .07em; }
.fc-unit--ap { font-size: .44em; --fh: 2.545em; width: 2.35em; margin-left: .35em; letter-spacing: .04em; font-weight: 600; }
.fc-top, .fc-bot, .fc-flap { position: absolute; left: 0; right: 0; overflow: hidden; background: var(--fg); color: var(--bg); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.fc-top, .fc-flap--top { top: 0; height: 50%; border-radius: .07em .07em 0 0; transform-origin: 50% 100%; }
.fc-bot, .fc-flap--bot { bottom: 0; height: 50%; border-radius: 0 0 .07em .07em; transform-origin: 50% 0; }
.fc-unit--ap .fc-top, .fc-unit--ap .fc-flap--top { border-radius: .16em .16em 0 0; }
.fc-unit--ap .fc-bot, .fc-unit--ap .fc-flap--bot { border-radius: 0 0 .16em .16em; }
.fc-top b, .fc-bot b, .fc-flap b { display: block; height: var(--fh); line-height: var(--fh); text-align: center; font-weight: inherit; }
.fc-bot b, .fc-flap--bot b { margin-top: calc(var(--fh) / -2); }
.fc-flap { visibility: hidden; z-index: 2; }
.fc-flap--bot { transform: rotateX(90deg); }
.is-flipping .fc-flap { visibility: visible; }
/* the hinge: a hairline across the middle and two pins */
.fc-unit::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: max(1px, .03em); margin-top: max(-.5px, -.015em); background: var(--bg); z-index: 3; }
.fc-unit::before { content: ""; position: absolute; top: 50%; left: .05em; right: .05em; height: .1em; margin-top: -.05em; z-index: 4;
  background: radial-gradient(circle, var(--bg) 0 35%, transparent 40%) left / .1em .1em no-repeat, radial-gradient(circle, var(--bg) 0 35%, transparent 40%) right / .1em .1em no-repeat; }
.fc-unit--ap::before { left: .14em; right: .14em; height: .22em; margin-top: -.11em; background-size: .22em .22em; }
.fc-colon { display: grid; gap: .2em; padding: 0 .06em; }
.fc-colon i { width: .11em; height: .11em; border-radius: 50%; background: var(--fg); }
.day-clock__label { display: flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--fg-2); }
@media (max-width: 900px) {
  .day-clock { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
}

.pre-open .day-hero { padding-top: 140px; }

/* three moments, then the hours in plain words */
.moments { display: grid; gap: 16px; }
.moments__tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.moment { margin-top: -1px; padding: 18px 0 0; border: 0; border-top: 2px solid transparent; background: none; text-align: left; cursor: pointer; font-size: clamp(22px, 2.3vw, 36px); font-weight: 500; letter-spacing: -0.035em; color: var(--fg-2); transition: color var(--t) var(--ease), border-color var(--t) var(--ease); }
.moment:hover { color: var(--fg); }
.moment[aria-pressed="true"] { color: var(--fg); border-top-color: var(--pomelo); }
.moment-text { font-size: clamp(17px, 1.4vw, 21px); line-height: 1.45; max-width: 52ch; color: var(--fg); margin-bottom: 8px; }
.moment-text:empty { display: none; }
.hours { font-size: 15px; color: var(--fg-2); }

/* who we are · about · values · mission */
.home-sec { padding: var(--sec) 0; border-top: 1px solid var(--line); }
.statement { font-size: clamp(34px, 4.8vw, 76px); font-weight: 500; line-height: 1.02; letter-spacing: -0.045em; max-width: 20ch; margin-bottom: clamp(40px, 5vw, 80px); }
.statement em { color: var(--pomelo); }
.statement--break { max-width: none; }
.statement--break em { display: block; } /* second line on its own line, wraps only if the screen is too narrow */
.home-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 112px); align-items: start; }
.home-split--rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.home-pic { aspect-ratio: 4 / 5; }
.home-text { display: grid; gap: 18px; align-content: start; }
.home-text p, .home-text div p { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.45; color: var(--fg); max-width: 46ch; }
.home-text div { display: grid; gap: 18px; }
.home-text .asks { margin-top: 8px; }
.manifesto { font-size: 15px; color: var(--fg-2); margin: calc(clamp(40px, 5vw, 80px) * -.6) 0 clamp(40px, 5vw, 72px); }
.values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; }
.values li { border-top: 1px solid var(--fg); padding-top: 16px; display: grid; gap: 8px; align-content: start; }
.values h3 { font-size: clamp(22px, 2vw, 30px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.05; }
.values p { color: var(--fg-2); font-size: 17px; max-width: 34ch; }
.values__pics { display: grid; grid-template-columns: 5fr 4fr 3fr; gap: 12px; margin-top: clamp(56px, 7vw, 104px); align-items: start; }
.values__pics .pic:nth-child(1) { aspect-ratio: 4 / 5; } .values__pics .pic:nth-child(2) { aspect-ratio: 1; } .values__pics .pic:nth-child(3) { aspect-ratio: 3 / 4; }
.mv { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 112px); }
.mv__text { font-size: clamp(22px, 2.2vw, 34px); font-weight: 500; line-height: 1.2; letter-spacing: -0.03em; }
.spark { margin-top: clamp(72px, 9vw, 144px); font-size: clamp(48px, 8.6vw, 148px); font-weight: 500; letter-spacing: -0.055em; line-height: .92; }
.spark em { color: var(--pomelo); }
@media (max-width: 900px) {
  .home-split, .home-split--rev, .mv { grid-template-columns: 1fr; }
  .home-split--rev .home-pic { order: -1; }
  .values { grid-template-columns: 1fr 1fr; }
  .values__pics { grid-template-columns: 1fr 1fr; }
  .values__pics .pic:nth-child(1) { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
}
@media (max-width: 560px) { .values { grid-template-columns: 1fr; } }
.home-text .asks__foot { font-family: var(--serif); font-style: italic; font-size: clamp(30px, 3.2vw, 50px); line-height: 1.08; letter-spacing: -0.01em; color: var(--pomelo); max-width: 22ch; margin-top: 12px; }

/* the clock's frame: thin orange by day, glowing after dark */
.flipclock { padding: .16em .2em; border: 2px solid var(--pomelo); border-radius: .18em; transition: box-shadow 900ms var(--ease-io); }
[data-mood="evening"] .flipclock { box-shadow: 0 0 .25em rgba(254,72,32,.75), 0 0 .9em rgba(254,72,32,.4), inset 0 0 .3em rgba(254,72,32,.35); }
