/* Odd Hours site: shared styles for Home, About and Journal.
   Tokens and type follow Brand/Odd Hours Style Guide.md (locked 18 Oct 2026). */
:root{
  --oh-paper:#F1EBDD; --oh-night:#19333D; --oh-dust-blue:#6F93A0; --oh-terracotta:#C76545;
  --oh-sand:#D8C7A7; --oh-ink:#171713; --oh-faded-gold:#B39A68;
  /* text-safe helpers: terracotta and dust blue fail small-text contrast on paper */
  --oh-terracotta-deep:#A44E30; --oh-dust-blue-deep:#4F6F7A;
  --font-display:'Cormorant Garamond', Georgia, serif;
  --font-ui:'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --font-hand:'Caveat', 'Bradley Hand', cursive;
  --gutter:max(24px, 4vw);
  --wrap:1120px;
}
*{ box-sizing:border-box; margin:0; padding:0; }
[hidden]{ display:none !important; }
html{ scroll-behavior:smooth; }
body{
  background-color:var(--oh-paper);
  /* faint paper grain, drawn in CSS so there's no texture file to replace */
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.09 0 0 0 0 0.09 0 0 0 0 0.07 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color:var(--oh-ink); font-family:var(--font-display); font-size:19px; line-height:1.45;
  -webkit-font-smoothing:antialiased;
}
a{ color:inherit; text-decoration:none; }
img{ display:block; max-width:100%; }
.mono{ font-family:var(--font-ui); }
.wrap{ width:min(var(--wrap), calc(100% - 2 * var(--gutter))); margin:0 auto; }
.visually-hidden{ position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.skip-link{ position:absolute; left:16px; top:-60px; z-index:100; background:var(--oh-ink); color:var(--oh-paper); padding:10px 14px; font-family:var(--font-ui); font-size:12px; border-radius:6px; }
.skip-link:focus{ top:12px; }
:focus-visible{ outline:2px solid var(--oh-terracotta-deep); outline-offset:3px; border-radius:4px; }

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  font-family:var(--font-ui); font-size:12.5px; font-weight:500; letter-spacing:0.04em;
  padding:12px 22px; border-radius:999px; border:1.3px solid var(--oh-ink);
  background:var(--oh-ink); color:var(--oh-paper); cursor:pointer; white-space:nowrap;
}
.btn-ghost{ background:transparent; color:var(--oh-ink); }
.btn-ghost:hover{ background:rgba(23,23,19,0.06); }
.btn-accent{ background:var(--oh-terracotta); border-color:var(--oh-terracotta); color:var(--oh-ink); }
/* on dark grounds */
.on-dark .btn{ background:var(--oh-paper); color:var(--oh-ink); border-color:var(--oh-paper); }
.on-dark .btn-ghost{ background:rgba(12,22,32,0.2); color:var(--oh-paper); border-color:rgba(241,235,221,0.75); }
.on-dark .btn-ghost:hover{ background:rgba(241,235,221,0.12); }
.on-dark .btn-accent{ background:var(--oh-terracotta); border-color:var(--oh-terracotta); color:var(--oh-ink); }
.on-dark :focus-visible{ outline-color:var(--oh-paper); }
.text-link{ font-family:var(--font-ui); font-size:12.5px; color:var(--oh-terracotta-deep); text-decoration:underline; text-underline-offset:4px; }

.eyebrow{ font-family:var(--font-ui); font-size:11.5px; letter-spacing:0.16em; text-transform:uppercase; }
.eyebrow .accent{ color:var(--oh-terracotta-deep); }
.note{ font-family:var(--font-hand); font-size:26px; line-height:1.08; color:var(--oh-ink); }

/* ---------- site header (sits over each page's hero art) ---------- */
.site-header{ position:absolute; z-index:30; top:0; left:0; right:0; color:var(--oh-paper); }
.site-nav{ display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:20px; padding:24px var(--gutter) 0; }
.site-logo{ justify-self:start; display:flex; align-items:center; gap:12px; font-family:var(--font-display); font-size:26px; letter-spacing:0.04em; line-height:1; white-space:nowrap; text-shadow:0 1px 10px rgba(0,0,0,0.35); }
.site-logo svg{ width:36px; height:36px; flex:none; }
.site-logo .logo-mark{ height:36px; width:auto; flex:none; filter:drop-shadow(0 1px 6px rgba(0,0,0,0.35)); }
.site-logo .logo-word{ height:20px; width:auto; flex:none; filter:drop-shadow(0 1px 6px rgba(0,0,0,0.35)); }
.site-links{ list-style:none; display:flex; gap:44px; font-family:var(--font-ui); font-size:11.5px; letter-spacing:0.14em; text-transform:uppercase; text-shadow:0 1px 6px rgba(0,0,0,0.45); }
.site-links a{ display:inline-block; padding:6px 0; border-bottom:1px solid transparent; }
.site-links a:hover, .site-links a[aria-current="page"]{ border-bottom-color:rgba(241,235,221,0.8); }
.site-right{ justify-self:end; display:flex; align-items:center; gap:16px; }
.site-clock{ font-family:var(--font-ui); font-size:11.5px; letter-spacing:0.08em; padding:7px 0; border-top:1px solid rgba(241,235,221,0.45); border-bottom:1px solid rgba(241,235,221,0.45); white-space:nowrap; font-variant-numeric:tabular-nums; text-shadow:0 1px 6px rgba(0,0,0,0.45); }
.pill{ font-family:var(--font-ui); font-size:11.5px; letter-spacing:0.06em; padding:7px 15px; border-radius:999px; border:1px solid rgba(241,235,221,0.65); background:rgba(12,22,32,0.18); color:var(--oh-paper); cursor:pointer; white-space:nowrap; }
.js-signin[data-auth-pending]{ visibility:hidden; }
.nav-user{ display:flex; align-items:center; }
.nav-user[hidden]{ display:none; }
.menu-btn{ display:none; }
.site-header :focus-visible{ outline-color:var(--oh-paper); }
.mobile-menu{ display:none; }
@media (max-width:820px){
  .site-nav{ grid-template-columns:1fr auto; padding-top:16px; gap:10px; }
  .site-links{ display:none; }
  .site-logo{ font-size:21px; gap:9px; }
  .site-logo svg{ width:28px; height:28px; }
  .site-logo .logo-mark{ height:28px; }
  .site-logo .logo-word{ height:15px; }
  .menu-btn{ display:inline-block; }
  .site-right{ gap:8px; }
  .mobile-menu{ display:block; margin:12px var(--gutter) 0; background:rgba(25,51,61,0.94); -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); border:1px solid rgba(241,235,221,0.18); border-radius:14px; padding:8px 18px; }
  .mobile-menu ul{ list-style:none; font-family:var(--font-ui); font-size:13px; letter-spacing:0.14em; text-transform:uppercase; }
  .mobile-menu li + li{ border-top:1px solid rgba(241,235,221,0.14); }
  .mobile-menu a{ display:block; padding:14px 2px; }
  .mobile-menu a[aria-current="page"]{ color:var(--oh-sand); }
}
@media (max-width:520px){
  .site-clock{ display:none; }
  .pill{ padding:6px 11px; font-size:10.5px; }
}

/* ---------- hero (each page has its own art) ---------- */
.hero{ position:relative; isolation:isolate; min-height:clamp(540px, 42vw, 660px); display:flex; align-items:center; color:var(--oh-paper); overflow:hidden; background:var(--oh-night); }
.hero-art{ position:absolute; inset:0; z-index:-2; width:100%; height:100%; object-fit:cover; object-position:var(--focus, 60% 50%); }
/* night wash: keeps the text side dark enough to read and pulls placeholder art toward the late hours */
.hero::before{ content:""; position:absolute; inset:0; z-index:-1;
  background:
    linear-gradient(90deg, rgba(14,28,36,0.8) 0%, rgba(14,28,36,0.5) 38%, rgba(14,28,36,0.06) 72%, rgba(14,28,36,0) 100%),
    linear-gradient(180deg, rgba(10,20,28,0.55) 0%, rgba(10,20,28,0) 26%),
    rgba(25,51,61,0.12); }
.hero-inner{ position:relative; width:min(var(--wrap), calc(100% - 2 * var(--gutter))); margin:0 auto; padding:120px 0 110px; display:grid; gap:14px; justify-items:start; }
.hero h1{ font-weight:500; font-size:clamp(46px, 6.4vw, 92px); line-height:0.95; letter-spacing:0.005em; max-width:12ch; text-shadow:0 2px 18px rgba(0,0,0,0.35); }
.hero-sub{ font-style:italic; font-size:clamp(22px, 2.2vw, 30px); line-height:1.2; max-width:24ch; text-shadow:0 1px 12px rgba(0,0,0,0.4); }
.hero .eyebrow{ color:var(--oh-sand); }
.hero-ctas{ display:flex; flex-wrap:wrap; gap:14px; margin-top:16px; }
.tear{ position:absolute; left:0; right:0; bottom:-1px; height:clamp(28px, 4vw, 56px); background:url("../assets/tear-bottom.svg") no-repeat bottom / 100% 100%; z-index:1; pointer-events:none; filter:drop-shadow(0 -3px 4px rgba(0,0,0,0.18)); }
.art-credit{ position:absolute; right:var(--gutter); bottom:clamp(44px, 5vw, 70px); z-index:2; font-family:var(--font-ui); font-size:10.5px; letter-spacing:0.06em; color:rgba(241,235,221,0.72); text-shadow:0 1px 6px rgba(0,0,0,0.5); }
.art-credit em{ font-style:italic; }
.placeholder-tag{ position:absolute; right:var(--gutter); bottom:clamp(44px, 5vw, 70px); z-index:2; font-family:var(--font-ui); font-size:10px; letter-spacing:0.1em; text-transform:uppercase; color:rgba(241,235,221,0.8); background:rgba(12,22,32,0.45); padding:4px 8px; border-radius:4px; }

/* smaller heroes for About and Journal */
.hero-page{ min-height:clamp(420px, 33vw, 520px); }
.hero-page h1{ font-size:clamp(52px, 6vw, 84px); }
.hero-page .hero-sub{ font-style:normal; max-width:22ch; }

/* ---------- sections ---------- */
.section{ padding:clamp(64px, 8vw, 110px) 0; }
.section-head{ display:grid; gap:12px; max-width:640px; }
.section-head h2, .h2{ font-weight:500; font-size:clamp(34px, 4vw, 52px); line-height:1.02; }
.h2 em, .section-head h2 em{ font-style:italic; }
.lede{ font-size:clamp(19px, 1.6vw, 22px); line-height:1.45; max-width:34em; }

/* dark band with a torn top edge */
.night{ position:relative; background:var(--oh-night); color:var(--oh-paper); }
.night::before{ content:""; position:absolute; left:0; right:0; top:calc(-1 * clamp(26px, 3.6vw, 50px) + 1px); height:clamp(26px, 3.6vw, 50px); background:url("../assets/tear-night.svg") no-repeat bottom / 100% 100%; pointer-events:none; }
.night .eyebrow{ color:var(--oh-sand); }

/* ---------- footer ---------- */
.site-footer{ padding:48px 0 44px; border-top:1px solid rgba(23,23,19,0.12); margin-top:0; }
.footer-band{ display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:20px; }
.footer-logo{ justify-self:start; display:flex; align-items:center; gap:12px; font-family:var(--font-display); font-size:23px; letter-spacing:0.04em; }
.footer-logo svg{ width:36px; height:36px; }
.footer-logo .logo-mark{ height:36px; width:auto; }
.footer-logo .logo-word{ height:16px; width:auto; }
.footer-links{ list-style:none; display:flex; gap:48px; font-family:var(--font-ui); font-size:11.5px; font-weight:500; letter-spacing:0.14em; text-transform:uppercase; }
.footer-links a{ display:inline-block; padding:6px 0; border-bottom:1px solid transparent; }
.footer-links a:hover, .footer-links a[aria-current="page"]{ border-bottom-color:var(--oh-ink); }
.footer-social{ justify-self:end; display:flex; align-items:center; gap:14px; }
.social{ width:34px; height:34px; border:1.3px solid var(--oh-ink); border-radius:50%; display:grid; place-items:center; }
.social svg{ width:18px; height:18px; }
.footer-rule{ display:block; width:min(300px, 70%); height:12px; margin:28px auto 26px; opacity:0.45; }
.footer-legal{ display:flex; flex-wrap:wrap; justify-content:center; gap:8px 22px; font-family:var(--font-ui); font-size:11px; letter-spacing:0.06em; color:rgba(23,23,19,0.72); }
.footer-legal a{ text-decoration:underline; text-underline-offset:3px; }
@media (max-width:760px){
  .footer-band{ grid-template-columns:1fr; justify-items:center; gap:22px; }
  .footer-logo, .footer-social{ justify-self:center; }
  .footer-links{ gap:28px; }
}

/* placeholder links: styled and focusable, but they go nowhere yet */
.placeholder-link{ cursor:default; }

/* ---------- motion ----------
   Rules for every Odd Hours page (MELT keeps its own, but uses the same timings):
   1. Motion answers the visitor. Hover, tap and page changes move; nothing moves on its own
      except the clock and things the visitor started (the demo, a playing take).
   2. Three speeds. --dur-quick for hover and tap (things under a finger), --dur-calm for
      opening and closing (menus, panels), --dur-slow for page changes and image drift.
      One easing: --ease-out, fast start and soft landing, like setting something down.
   3. Small distances. Lift 1-2px, press to 97%, images drift 4% at most. Nothing bounces,
      spins or flashes.
   4. Hover is for mouse and trackpad only (hover:hover), so phones never get a stuck hover.
      Every button and link gets a press state for taps instead.
   5. Reduced motion keeps colour and opacity changes but drops movement: no lifts, no
      presses, no image drift, no page crossfade, no smooth scrolling. */
:root{
  --ease-out:cubic-bezier(.2, .7, .2, 1);
  --dur-quick:.16s; --dur-calm:.28s; --dur-slow:.45s;
}
html{ -webkit-tap-highlight-color:transparent; }

/* hover and tap feedback */
.btn, .pill, .social{ transition:transform var(--dur-quick) var(--ease-out), background-color var(--dur-quick) ease, color var(--dur-quick) ease, border-color var(--dur-quick) ease, filter var(--dur-quick) ease; }
.site-links a, .footer-links a{ transition:border-color var(--dur-quick) ease; }
.footer-legal a, .text-link{ transition:text-decoration-color var(--dur-quick) ease, color var(--dur-quick) ease; }
@media (hover:hover){
  .btn:hover{ transform:translateY(-1px); }
  .btn:not(.btn-ghost):hover{ filter:brightness(1.12); }
  .pill:hover{ background:rgba(241,235,221,0.16); border-color:var(--oh-paper); }
  .social:hover{ background:var(--oh-ink); color:var(--oh-paper); transform:translateY(-1px); }
  .footer-legal a:hover{ color:var(--oh-ink); }
  .text-link:hover{ color:var(--oh-ink); }
}
.btn:active, .pill:active, .social:active{ transform:scale(.97); transition-duration:.06s; }
.site-links a:active, .footer-links a:active, .mobile-menu a:active{ opacity:.6; }

/* phone menu: settles in from just above */
.mobile-menu:not([hidden]){ animation:oh-settle var(--dur-calm) var(--ease-out) both; }
@keyframes oh-settle{ from{ opacity:0; transform:translateY(-6px); } to{ opacity:1; transform:none; } }

/* page changes: a slow crossfade between Odd Hours pages (Chrome, Edge, Safari 18.2+;
   other browsers change pages instantly). The header holds still so only the page fades. */
@view-transition{ navigation:auto; }
.site-header{ view-transition-name:oh-header; }
::view-transition-old(root), ::view-transition-new(root){ animation-duration:var(--dur-slow); animation-timing-function:var(--ease-out); }

@media (prefers-reduced-motion:reduce){
  html{ scroll-behavior:auto; }
  @view-transition{ navigation:none; }
  *, *::before, *::after{ animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-property:color, background-color, border-color, opacity, text-decoration-color, filter !important; }
  .btn:hover, .btn:active, .pill:active, .social:hover, .social:active{ transform:none; }
}

/* phones get the essentials: handwritten flourishes are desktop and tablet only */
@media (max-width:640px){
  .note-desktop{ display:none !important; }
}
