/* ============ my.adhd — chrome ============
   The bar, the footer, the clock and the theme toggle, for the pages that
   are neither the app nor the public site: /privacy, /terms, /install and
   /admin. Loaded after theme.css (the palette) and bento.css (the piece);
   THE PIECES, at the end, draws them in the my.adhd look (BRAND.md §5). */

*{box-sizing:border-box; margin:0; padding:0}

:root{
  /* the one gap between the bar and the first line of copy */
  --top-gap:clamp(14px,3.4vh,34px);
  /* where the bar's first pixel goes, so it stops where the status bar
     ends; the bar pads itself down by this much */
  --safe-top:env(safe-area-inset-top, 0px);
  --nav-gap:clamp(10px,2vh,18px);
  --bar-top:calc(var(--nav-gap) + var(--safe-top));
  --bar-bottom:var(--nav-gap);
  --bar-h:calc(var(--bar-top) + var(--nav-row) + var(--bar-bottom));
  /* the bar's tallest control; CSS cannot measure a box */
  --nav-row:34px;
}

body{
  font-family:var(--display);
  -webkit-font-smoothing:antialiased;
  line-height:1.5;
  overflow-x:hidden;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
}

/* ---------- shared bits ---------- */

.cta{
  display:inline-flex; align-items:center; justify-content:center;
  text-decoration:none;
  font-size:clamp(15px,2vh,18px); 
  padding:clamp(13px,1.9vh,17px) clamp(32px,5vw,48px);
}
.cta:active{transform:translateY(0)}

/* The bar holds the top of the window while the page runs under it.

   No measure of its own: the mark sits on the window's left gutter and the
   toggle on its right, at every width. It used to be capped at 1080 like a
   column of text, which on a wide screen left both of them adrift in the
   middle of the top of the screen with a hand's width of empty page outside
   each — a bar reads as the frame of the window, so it has to touch the
   window. The 1080 measure moved down to .why, which is the only thing on
   the page that is actually a column. */
.nav{
  /* Fixed, not sticky. Sticky is bounded by the box it sits in, and this
     one sits in the hero — so the bar pinned across the first screen and
     then rode away the moment .why started, taking the only control on the
     page with it. Fixed leaves the flow instead, which is also what lets
     the hero keep its full 100dvh above.

     It carries its own safe-area gutters now. They used to come from the
     hero's padding, and a bar fixed to the window no longer sits inside
     that. */
  position:fixed; top:0; left:0; right:0; z-index:20;
  display:flex; align-items:center; gap:10px;
  padding-top:var(--bar-top);
  padding-bottom:var(--bar-bottom);
  padding-left:calc(clamp(20px,5vw,40px) + env(safe-area-inset-left, 0px));
  padding-right:calc(clamp(20px,5vw,40px) + env(safe-area-inset-right, 0px));
}
/* the mark on the left, the clock and the toggle on the right */
.nav .theme-toggle{margin-left:auto}

/* ---------- the clock ----------
   The visitor's own city and the time it is there. Ambient, not a control:
   it sits at --faint and never at the ink of something you can press, and
   it carries the bar's one piece of information that is different for
   every person who loads the page.

   Small caps and wide tracking are what keep it reading as a label rather
   than as a second wordmark — at 12px the face's own rounding is already
   doing enough. Tabular figures so the minute ticking over does not walk
   the city name sideways.

   Hidden until clock.js fills it: an empty gap in the bar is worse than no
   clock, and a browser that will not name its zone gets none at all. */
.nav-clock{
  display:flex; align-items:baseline; gap:.9em;
  margin:0 8px 0 auto;
  font-size:12px; 
  text-transform:uppercase; white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
.nav-clock[hidden]{display:none}
/* the toggle keeps its own auto margin for whenever there is no clock */
.nav-clock:not([hidden]) ~ .theme-toggle{margin-left:0}

/* On a phone the city is the half that goes: the time is the part that is
   actually about you, and the mark still needs its own room. */
@media (max-width:520px){
  .nav-clock .nc-place{display:none}
}

/* Centred in its row. This was top-aligned, on the reasoning that the
   headline should claim the upper screen rather than sit dead-centre with
   a void above it — which was right while an illustration filled the
   space underneath. With only the copy left, top-aligning puts that same
   void below instead, and on a tall phone it took half the screen. The
   concern was always the void, not the alignment. */
/* One word, one line. The two-line title was bounded by height, so the vh
   term led and the vw term was the safety net; a single long word inverts
   that — width is what it can overrun, and the vh term is only there to
   stop a wide short window eating the sub. The ceiling is the 36rem the
   copy column is held to above 820px — the word sets at 4.75em, so 116px
   is the largest that stays inside it without the column widening for a
   measure only the sub needs. */
/* Sized for a sentence, not a single word — the 116px ceiling "Everything."
   used would set nine words across three screens. Still the biggest thing
   in the hero: bold, tight leading, held to a measure that wraps it onto
   two or three lines rather than one long ragged one.

   Sized up a step from its first pass, now that the explainer paragraph
   under it is gone — the sentence is the only thing above the fold that
   argues the app's case, so it gets the room the paragraph used to hold. */
/* Base weight and spacing for all three rows; each row overrides its own
   font-size below. line-height is per-row too (a 74px line and a 32px
   line don't want the same leading), so it isn't set here. */

/* ---------- motion, the home screen, the sprite ---------- */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms !important; transition-duration:.01ms !important}
}

/* Launched from the home screen there is no browser chrome to hold the
   status bar off, and iOS does not always report an inset, so floor it. */
@media (display-mode:standalone){
  :root{--bar-top:calc(clamp(2px,0.6vh,6px) + max(env(safe-area-inset-top, 0px), 34px))}
}

/* The sprite the lockup reads from: an inline <svg> left visible would
   draw a line box. */
.sprite{position:absolute; width:0; height:0; overflow:hidden}

/* ============ the footer ============
   /install's: the content held to a 1080 measure. THE PIECES draws it. */
.site-foot{
  --foot-measure:1080px;
  --foot-gutter:clamp(20px,5vw,40px);
  --foot-inner-measure:calc(var(--foot-measure) - var(--foot-gutter) * 2);
  padding:clamp(38px,5.5vw,60px) 0 clamp(20px,2.6vw,28px);
  padding-left:max(var(--foot-gutter), env(safe-area-inset-left,0px));
  padding-right:max(var(--foot-gutter), env(safe-area-inset-right,0px));
  padding-bottom:calc(clamp(20px,2.6vw,28px) + env(safe-area-inset-bottom,0px));
}
.foot-inner{max-width:var(--foot-inner-measure); margin:0 auto; display:grid; gap:clamp(28px,4vw,40px)}
.foot-brand{display:flex; flex-direction:column; align-items:flex-start; gap:12px}
.foot-blurb{font-size:14px; line-height:1.6; color:var(--muted); max-width:34ch}
.foot-cols{
  display:grid; gap:clamp(20px,3vw,28px);
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
}
.foot-col h2{
  font-size:12px; font-weight:700; letter-spacing:.08em;
  text-transform:uppercase; color:var(--faint);
}
.foot-col ul{list-style:none; margin-top:12px; display:grid; gap:9px}
.foot-col a{
  font-size:14.5px; font-weight:600; letter-spacing:-.01em;
  color:var(--ink-soft); text-decoration:none;
  border-bottom:1.5px solid transparent; padding-bottom:1px;
  transition:color .16s var(--ease), border-color .16s var(--ease);
}
.foot-col a:hover{color:var(--accent); border-bottom-color:var(--accent)}
.foot-col a[href^="mailto:"]{overflow-wrap:anywhere}
.foot-base{
  max-width:var(--foot-inner-measure); margin:clamp(30px,4vw,44px) auto 0;
  padding-top:clamp(16px,2.2vw,22px);
  border-top:1px solid var(--line-strong);
  display:flex; flex-wrap:wrap; align-items:baseline;
  justify-content:space-between; gap:8px 20px;
  font-size:12.5px; line-height:1.55; color:var(--faint);
}
.foot-note{max-width:52ch}
.foot-copy{white-space:nowrap}
.foot-col .foot-social{display:flex; gap:10px; margin-top:14px}
.foot-col .foot-social a{
  width:34px; height:34px; padding:0;
  display:grid; place-items:center;
  border:1.5px solid var(--line-strong); border-radius:999px;
  color:var(--muted);
  transition:color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.foot-col .foot-social a:hover{color:var(--accent); border-color:var(--accent); background:var(--surface)}
.foot-col .foot-social svg{width:17px; height:17px; display:block}

main{position:relative; z-index:1}

/* Every in-page link clears the fixed bar. */
html{scroll-padding-top:calc(var(--bar-h) + clamp(10px,2vh,22px))}
@media (prefers-reduced-motion:no-preference){
  html{scroll-behavior:smooth}
}


/* ============ THE PIECES ============
   The look (BRAND.md §5): a flat ground, and pieces on it with an ink
   outline and a hard shadow. Tokens are in bento.css. */

body{background:var(--b-ground); color:var(--ink)}
main{background:transparent}

/* A piece's own day: pieces keep their day colours at night, so the type
   inside one does too (as in site.css). */
.site-foot .foot-col, .cta{
  --ink:var(--black); --ink-soft:var(--navy); --muted:var(--stone); --faint:#6B6B7A;
  --line:#E4E2F5; --line-strong:#CFCBE9; --accent:var(--blue); --wash:#F4F3FE;
  --b-focus:var(--blue);
}

a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible{
  outline:3px solid var(--b-focus) !important; outline-offset:3px;
}

/* ---------- the bar's controls ---------- */
.nav-clock{font-family:var(--mono); font-weight:400; letter-spacing:.04em; color:var(--b-muted)}
.theme-toggle{
  width:44px; height:44px;
  background:var(--p-pale); color:var(--black);
  border:var(--b-stroke) solid var(--b-line);
  box-shadow:var(--b-lift-sm) var(--b-lift-sm) 0 var(--orange);
  transition:transform var(--b-release) var(--ease), box-shadow var(--b-release) var(--ease);
}
.theme-toggle:focus-visible{box-shadow:var(--b-lift-sm) var(--b-lift-sm) 0 var(--orange)}
:root[data-theme="dark"] .theme-toggle, :root[data-theme="dark"] .theme-toggle:focus-visible{box-shadow:var(--b-lift-sm) var(--b-lift-sm) 0 var(--blue)}
.theme-toggle:hover{background:var(--p-pale); color:var(--black); border-color:var(--b-line)}
.theme-toggle svg{width:20px; height:20px}

/* ---------- the button ----------
   An ink capsule (navy at night) casting the stand-in shadow: orange by
   day, blue at night. It rises under the pointer and sinks when pressed. */
.cta{
  --l:var(--b-lift);
  min-height:54px;
  background:var(--p-ink); color:var(--p-on-dark);
  border:var(--b-stroke) solid var(--b-line); border-radius:var(--b-pill);
  font-family:var(--display); font-weight:800; letter-spacing:-.01em;
  box-shadow:var(--l) var(--l) 0 var(--b-shadow-ink);
  transition:transform var(--b-release) var(--ease), box-shadow var(--b-release) var(--ease);
}
.cta:hover{transform:none; box-shadow:var(--l) var(--l) 0 var(--b-shadow-ink)}
.cta:focus-visible{outline:3px solid var(--b-focus); outline-offset:3px}
@media (hover:hover) and (prefers-reduced-motion:no-preference){
  .cta:hover{transform:translate(-2px,-2px); box-shadow:calc(var(--l) + 2px) calc(var(--l) + 2px) 0 var(--b-shadow-ink)}
}
@media (prefers-reduced-motion:no-preference){
  .cta:active, .theme-toggle:active{transform:translate(var(--l,var(--b-lift-sm)),var(--l,var(--b-lift-sm))); box-shadow:0 0 0 transparent; transition-duration:0s}
}
@media (prefers-reduced-motion:reduce){
  .cta:active, .theme-toggle:active{opacity:.7}
}

/* ---------- the footer ----------
   The brand block is an ink piece, each column a piece in the four quiet
   fills in turn. */
.site-foot{background:transparent; border-top:0; position:relative; z-index:auto}
.site-foot .foot-inner{gap:var(--gap,18px)}
.site-foot .foot-brand{
  padding:clamp(20px,3vw,28px);
  background:var(--p-ink); color:var(--p-on-dark);
  border:var(--b-stroke) solid var(--b-line); border-radius:var(--b-radius);
  box-shadow:var(--b-lift) var(--b-lift) 0 var(--b-shadow-ink);
}
.site-foot .foot-brand .wordmark{color:var(--p-on-dark); font-size:22px; font-weight:800}
.site-foot .foot-blurb{color:var(--p-pale); font-size:15px}
.site-foot .foot-cols{gap:var(--gap,18px)}
.site-foot .foot-col{
  padding:18px 20px 20px;
  background:var(--p-white); color:var(--ink);
  border:var(--b-stroke) solid var(--b-line); border-radius:var(--b-radius);
  box-shadow:var(--b-lift) var(--b-lift) 0 var(--b-shadow);
}
.site-foot .foot-col:nth-child(4n+2){background:var(--p-pale)}
.site-foot .foot-col:nth-child(4n+3){background:var(--p-violet-pale)}
.site-foot .foot-col:nth-child(4n+4){background:var(--p-blue-pale)}
.site-foot .foot-col:not(:nth-child(4n+1)){--muted:var(--navy); --faint:var(--navy)}
.site-foot .foot-col h2{
  font-family:var(--display); font-size:13px; font-weight:700;
  letter-spacing:.06em; color:var(--ink);
}
.site-foot .foot-col a{
  color:var(--ink); font-weight:700;
  border-bottom:2px solid currentColor;
}
.site-foot .foot-col a:hover{color:var(--ink); border-bottom-color:var(--orange)}
.site-foot .foot-col .foot-social a{
  width:44px; height:44px;
  background:var(--p-white); color:var(--black);
  border:var(--b-stroke-thin) solid var(--b-line); border-radius:var(--b-pill);
}
.site-foot .foot-col .foot-social a:hover{background:var(--p-wash); color:var(--black); border-color:var(--b-line)}
.site-foot .foot-base{border-top:0; padding-top:0; color:var(--b-muted)}

/* ============ ICON STROKES ============
   BRAND.md §4.3: an icon's stroke is the stem of the text it sits with.
   It is drawn in screen pixels (vector-effect) and sized in em, so an
   icon inside its label follows the label's size, and the --stem-* token
   names the label's face and weight. The footer's social links have no
   words; they read as the column's links (Baloo 2 700, 14.5px). */
.foot-col .foot-social svg *{vector-effect:non-scaling-stroke}
.foot-col .foot-social svg{font-size:14.5px; stroke-width:var(--stem-baloo-700)}
