/* albedo.click. Four palettes: Day / Night (data-side: the clock or the orb toggle) x light / dark (system).
   Type per the brief: Shippori Mincho for titles, Zen Kaku Gothic New for text; sentence case throughout.
   Paintings are shown whole (their own aspect ratio), never cropped to a shape. Buttons are pills; nothing else is rounded much. */

@font-face { font-family: "Shippori Mincho"; src: url("../fonts/shippori-mincho-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Shippori Mincho"; src: url("../fonts/shippori-mincho-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Zen Kaku Gothic New"; src: url("../fonts/zen-kaku-gothic-new-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Zen Kaku Gothic New"; src: url("../fonts/zen-kaku-gothic-new-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

/* Day, light: the brand cream with Albedo's forest green */
:root, :root[data-side="day"] {
  --bg: #FFF4E6; --bg-2: #F6E7D0; --ink: #241D36; --ink-2: #5A5367; --line: rgba(36, 29, 54, .16);
  --accent: #2F5D46; --accent-ink: #FFF4E6; --glow: rgba(201, 162, 74, .30); --veil: 255, 244, 230;
}
/* Night, light: moonlit lavender with a deep violet */
:root[data-side="night"] {
  --bg: #EFEBF6; --bg-2: #E3DCEE; --ink: #211A33; --ink-2: #5B546E; --line: rgba(33, 26, 51, .16);
  --accent: #4B3D86; --accent-ink: #F7F3FF; --glow: rgba(169, 155, 214, .38); --veil: 239, 235, 246;
}
@media (prefers-color-scheme: dark) {
  /* Day, dark: evening garden green */
  :root, :root[data-side="day"] {
    --bg: #141B16; --bg-2: #1B241D; --ink: #F4ECDD; --ink-2: #B8C1B1; --line: rgba(244, 236, 221, .15);
    --accent: #A9CBA4; --accent-ink: #122016; --glow: rgba(201, 162, 74, .22); --veil: 20, 27, 22;
  }
  /* Night, dark: the brand indigo with pale violet */
  :root[data-side="night"] {
    --bg: #19162D; --bg-2: #211C39; --ink: #EFE9F6; --ink-2: #B7AFCC; --line: rgba(239, 233, 246, .14);
    --accent: #A99BD6; --accent-ink: #19162D; --glow: rgba(169, 155, 214, .30); --veil: 25, 22, 45;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.7 "Zen Kaku Gothic New", system-ui, sans-serif;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: "Shippori Mincho", Georgia, serif; font-weight: 600; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6vw, 5.6rem); line-height: 1.02; letter-spacing: -.015em; }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.1; letter-spacing: -.01em; }
h3 { font-size: clamp(1.35rem, 1.8vw, 1.7rem); line-height: 1.2; }
p { margin: 0; max-width: 36em; text-wrap: pretty; }
svg { width: 1.2em; height: 1.2em; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
[data-side="day"] .only-night, [data-side="night"] .only-day { display: none !important; }

/* paper grain over everything, fixed so it never repaints on scroll */
.grain {
  position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: .06; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) { .grain { mix-blend-mode: screen; opacity: .045; } }

.skip { position: absolute; left: -999px; top: 10px; background: var(--accent); color: var(--accent-ink); padding: .5rem 1rem; border-radius: 999px; z-index: 50; }
.skip:focus { left: 12px; }

/* header: floats over the hero, gains a surface once the page scrolls (site.js); solid on the inner pages */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: flex; align-items: center; gap: 2.5rem;
  height: calc(72px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) clamp(1.25rem, 4vw, 3.5rem) 0;
  transition: background-color .35s, border-color .35s; border-bottom: 1px solid transparent;
}
.top.is-solid, body:not(.home) .top { background: rgba(var(--veil), .84); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; }
.brand-orb { width: 34px; height: 34px; }
.brand-word { font-family: "Shippori Mincho", Georgia, serif; font-weight: 600; font-size: 1.45rem; letter-spacing: .01em; }
.nav { display: flex; gap: 2rem; margin-left: auto; font-size: 1rem; }
.nav a { text-decoration: none; opacity: .8; transition: opacity .2s; padding: .5rem 0; }
.nav a:hover { opacity: 1; }
.side-toggle {
  display: inline-flex; align-items: center; gap: .5rem; height: 44px; padding: 0 1.1rem 0 .85rem;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(var(--veil), .7); color: var(--ink);
  font: 500 .95rem/1 "Zen Kaku Gothic New", system-ui, sans-serif; cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: border-color .2s, transform .2s cubic-bezier(.16, 1, .3, 1);
}
.side-toggle:hover { border-color: var(--accent); }
.side-toggle:active { transform: scale(.97); }
.side-icon { display: inline-flex; }
.menu-btn { display: none; }

main { display: block; }

/* hero: the approved terrace banner, the sunset sea on the left and the rain window on the right. Shown whole on wide
   screens; phones get the tall crop of the side they are on. The copy sits over the calm sky and sea. */
.hero { position: relative; min-height: min(100dvh, 920px); display: grid; align-items: end; overflow: hidden; isolation: isolate; }
.hero-art, .hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art img { object-fit: cover; object-position: 50% 60%; }
.hero-veil {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(var(--veil), .55) 0, transparent 160px),
    linear-gradient(0deg, var(--bg) 0%, rgba(var(--veil), .86) 22%, rgba(var(--veil), .35) 48%, transparent 70%);
}
.rain { position: absolute; z-index: 1; display: none; left: 70%; top: 0; width: 30%; height: 72%; pointer-events: none; }
[data-side="night"] .rain { display: block; }
.hero-copy { position: relative; z-index: 2; width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 5.5rem) clamp(3rem, 8vh, 6rem); }
.hero h1 { max-width: 11em; }
.hero-sub { margin-top: 1.5rem; font-size: clamp(1.1rem, 1.4vw, 1.3rem); color: var(--ink-2); max-width: 28em; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 1.75rem; margin-top: 2.25rem; }
.hero-hint { margin-top: 2.5rem; font-size: .95rem; color: var(--ink-2); max-width: 30em; }
.btn {
  display: inline-flex; align-items: center; gap: .6rem; white-space: nowrap; min-height: 52px; padding: 0 1.6rem;
  border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 1.02rem;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 14px 34px -14px color-mix(in srgb, var(--accent) 70%, transparent);
  transition: transform .25s cubic-bezier(.16, 1, .3, 1), box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.text-link { text-decoration: none; font-weight: 500; border-bottom: 1px solid currentColor; padding: .35rem 0 2px; opacity: .85; transition: opacity .2s; }
.text-link:hover { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  .home .hero-art img { animation: settle 2.6s cubic-bezier(.16, 1, .3, 1) both; }
  .home .hero-copy { animation: rise 1.1s cubic-bezier(.16, 1, .3, 1) .15s both; }
}
@keyframes settle { from { transform: scale(1.05); } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

section { position: relative; }
.day, .characters, .latest, .channels { max-width: 1360px; margin: 0 auto; padding: clamp(5rem, 11vw, 9rem) clamp(1.25rem, 5vw, 5.5rem); }

/* a day with Albedo: the one ordered thing on the page, so it is drawn as a clock line */
.day { display: grid; grid-template-columns: minmax(16rem, 1fr) 2fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.day-intro { position: sticky; top: 6rem; }
.day-intro p { margin-top: 1.25rem; color: var(--ink-2); }
.clock { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.clock li { position: relative; display: grid; grid-template-columns: 6.5rem 1fr; gap: .35rem 1.5rem; padding: 1.6rem 0 1.6rem 2rem; }
.clock li::before { content: ""; position: absolute; left: -5px; top: 2.25rem; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.clock li + li { border-top: 1px solid var(--line); }
.clock time { font-family: "Shippori Mincho", Georgia, serif; font-size: 1.25rem; font-weight: 600; grid-row: span 2; padding-top: .15rem; }
.clock p { color: var(--ink-2); font-size: 1rem; }
.clock-live time { font-size: 1.05rem; }
.live-note { display: block; margin-top: .2rem; }

/* characters: two whole paintings side by side, their own proportions, the night one set lower */
.characters { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: clamp(1.5rem, 3.5vw, 3.5rem); align-items: start; }
.characters-intro { padding-top: clamp(1rem, 4vw, 4rem); }
.characters-intro p { margin-top: 1.25rem; color: var(--ink-2); }
.portrait { margin: 0; }
.portrait img { width: 100%; box-shadow: 0 40px 80px -40px var(--glow); }
.portrait-night { margin-top: clamp(3rem, 9vw, 8rem); }
.portrait figcaption { margin-top: 1.25rem; }
.portrait figcaption p { margin-top: .3rem; color: var(--ink-2); font-size: 1rem; }

/* latest: click-to-load YouTube embeds (brief §4) */
.latest-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem 2rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.latest-empty { color: var(--ink-2); font-size: 1.15rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.latest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; }
.yt { margin: 0; }
.yt-load { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--bg-2); cursor: pointer; aspect-ratio: 16 / 9; overflow: hidden; }
.yt.short .yt-load { aspect-ratio: 9 / 16; max-width: 360px; }
.yt-load img { width: 100%; height: 100%; object-fit: cover; }
.yt-play { position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; background: rgba(var(--veil), .9); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); transition: transform .2s; }
.yt-play::after { content: ""; position: absolute; left: 28px; top: 22px; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent var(--ink); }
.yt-load:hover .yt-play { transform: scale(1.05); }
.yt iframe { display: block; width: 100%; height: 100%; border: 0; aspect-ratio: 16 / 9; }
.yt figcaption { margin-top: .75rem; font-size: 1rem; }

/* listen live: full bleed painting, the text on the calm water */
.live { display: grid; align-items: end; overflow: hidden; isolation: isolate; min-height: 520px; margin-top: clamp(1rem, 4vw, 3rem); }
.live-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 20% 50%; }
.live-veil { position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(14, 11, 26, .9) 0%, rgba(14, 11, 26, .5) 40%, transparent 70%); }
.live-copy { position: relative; z-index: 2; color: #F6F1FC; width: 100%; max-width: 1360px; margin: 0 auto; padding: clamp(10rem, 30vw, 22rem) clamp(1.25rem, 5vw, 5.5rem) clamp(3rem, 8vh, 6rem); }
.live-copy p { margin: 1.2rem 0 0; }
.live-copy p + p { margin-top: .6rem; }
.live-copy .live-embed { margin-top: 2rem; }
.live-copy .cta-row { margin-top: 2rem; }
.live-copy p { color: rgba(246, 241, 252, .84); }
.live-embed:not(:empty) { max-width: 760px; margin: 0 0 2rem; }
.live-copy .cta-row { margin-top: 0; }
.text-link-light { color: #F6F1FC; }
.btn-light { background: #F6F1FC; color: #211A33; box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .7); }

/* channels */
.channel-list { list-style: none; margin: clamp(2rem, 4vw, 3.5rem) 0 0; padding: 0; border-top: 1px solid var(--line); }
.channel-list li { border-bottom: 1px solid var(--line); }
.channel { display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; gap: .5rem 1.25rem; padding: 1.5rem 0; text-decoration: none; }
.channel svg { width: 1.6em; height: 1.6em; align-self: center; }
.channel-name { font-family: "Shippori Mincho", Georgia, serif; font-weight: 600; font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.1; transition: color .25s; }
.channel-what { color: var(--ink-2); }
.channel:hover .channel-name, .channel:focus-visible .channel-name { color: var(--accent); }
.channels-note { margin-top: 2.5rem; color: var(--ink-2); }

/* inner pages (about, press, privacy, terms, 404) */
.page { max-width: 1360px; margin: 0 auto; padding: calc(72px + clamp(3rem, 8vw, 6rem)) clamp(1.25rem, 5vw, 5.5rem) clamp(5rem, 10vw, 8rem); }
.page-head { max-width: 40rem; margin-bottom: clamp(2.5rem, 6vw, 5rem); }
.page-head p { margin-top: 1.25rem; color: var(--ink-2); font-size: 1.15rem; }
.prose { max-width: 40rem; }
.prose h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 2.75rem 0 .9rem; }
.prose h3 { font-size: 1.2rem; margin: 2rem 0 .6rem; }
.prose p, .prose li { max-width: none; }
.prose p + p { margin-top: 1rem; }
.prose ul { padding-left: 1.2rem; margin: 1rem 0; }
.prose li + li { margin-top: .4rem; }
.prose a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose .meta { color: var(--ink-2); font-size: .95rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.two-col .portrait { max-width: 420px; }
.kit { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2rem; margin-top: 1rem; }
.kit figure { margin: 0; }
.kit img { width: 100%; background: var(--bg-2); border: 1px solid var(--line); }
.kit figcaption { margin-top: .75rem; font-size: .95rem; }
.kit figcaption a { display: block; color: var(--accent); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; list-style: none; padding: 0; margin: 1rem 0 0; }
.swatches li { font-size: .9rem; }
.swatches i { display: block; height: 56px; border: 1px solid var(--line); margin-bottom: .4rem; }
.notfound { min-height: 70vh; display: grid; align-content: center; }

/* footer */
.foot {
  display: grid; grid-template-columns: 1fr auto; gap: 1.25rem 2rem; align-items: center;
  padding: 3rem clamp(1.25rem, 5vw, 5.5rem); border-top: 1px solid var(--line); max-width: 1360px; margin: 0 auto;
}
.foot-brand p { color: var(--ink-2); font-size: 1rem; }
.foot-nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; font-size: .95rem; }
.foot-nav a { text-decoration: none; opacity: .8; padding: .5rem 0; }
.foot-nav a:hover { opacity: 1; }
.foot-links { display: flex; gap: .6rem; }
.foot-links a { display: inline-flex; width: 46px; height: 46px; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid var(--line); transition: border-color .2s; }
.foot-links a:hover { border-color: var(--accent); }
.foot-legal { grid-column: 1 / -1; color: var(--ink-2); font-size: .9rem; }

/* side switch: a circular reveal from the toggle (View Transitions where supported, instant elsewhere) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* tablets */
@media (max-width: 1099px) {
  .characters { grid-template-columns: 1fr 1fr; }
  .characters-intro { grid-column: 1 / -1; padding-top: 0; }
  .day { grid-template-columns: 1fr; }
  .day-intro { position: static; }
}
/* phones: a real menu, the tall hero crop of the current side, one column */
@media (max-width: 767px) {
  .top { gap: .75rem; height: calc(64px + env(safe-area-inset-top)); }
  .side-toggle { margin-left: auto; }
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -.5rem;
    border: 0; background: transparent; color: inherit; cursor: pointer; border-radius: 999px;
  }
  .menu-bar, .menu-bar::before, .menu-bar::after { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s, background-color .2s; }
  .menu-bar { position: relative; }
  .menu-bar::before, .menu-bar::after { content: ""; position: absolute; left: 0; }
  .menu-bar::before { top: -7px; }
  .menu-bar::after { top: 7px; }
  .menu-btn[aria-expanded="true"] .menu-bar { background: transparent; }
  .menu-btn[aria-expanded="true"] .menu-bar::before { transform: translateY(7px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-bar::after { transform: translateY(-7px) rotate(-45deg); }
  .nav {
    display: none; position: fixed; left: 0; right: 0; top: calc(64px + env(safe-area-inset-top)); z-index: 29;
    flex-direction: column; gap: 0; padding: .5rem clamp(1.25rem, 5vw, 2rem) 1.25rem; margin: 0;
    background: rgba(var(--veil), .96); border-bottom: 1px solid var(--line);
    font-family: "Shippori Mincho", Georgia, serif; font-size: 1.5rem;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: .8rem 0; border-top: 1px solid var(--line); opacity: 1; }
  .nav a:first-child { border-top: 0; }
  .hero { min-height: min(100dvh, 860px); }
  [data-side="day"] .hero-art img { object-position: 0% 50%; }
  [data-side="night"] .hero-art img { object-position: 100% 50%; }
  .rain { left: 0; width: 100%; height: 55%; }
  .hero-veil { background: linear-gradient(180deg, rgba(var(--veil), .5) 0, transparent 120px), linear-gradient(0deg, var(--bg) 0%, rgba(var(--veil), .9) 30%, rgba(var(--veil), .4) 52%, transparent 72%); }
  .hero-copy { padding-bottom: 2.5rem; }
  .hero-hint { display: none; }
  .clock li { grid-template-columns: 1fr; padding-left: 1.5rem; }
  .clock time { grid-row: auto; font-size: 1rem; }
  .characters { grid-template-columns: 1fr; }
  .portrait-night { margin-top: 0; }
  .portrait { max-width: 86vw; }
  .live { min-height: 0; }
  .live-copy { padding-top: 14rem; }
  .channel { grid-template-columns: auto 1fr; }
  .channel-what { grid-column: 1 / -1; }
  .two-col { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr; }
}

/* over the hero art the header text gets a soft halo in the page colour (gone once the header is solid) */
.home .top:not(.is-solid) .nav a, .home .top:not(.is-solid) .brand-word { text-shadow: 0 0 14px var(--bg), 0 0 4px var(--bg); }
