/* heyigotyou.app — one stylesheet for every page.
   The app icon's paper and ink, and one green kept for "it happened":
   the button, the notification, the moment a watch fires. */
@font-face { font-family: "Newsreader"; src: url("fonts/Newsreader-Roman.woff2") format("woff2");
             font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/Newsreader-Italic.woff2") format("woff2");
             font-weight: 200 800; font-style: italic; font-display: swap; }

:root {
  color-scheme: light dark;
  --paper: #F6F6EA;    /* the app icon's paper */
  --paper-2: #ECECDC;  /* panels */
  --ink: #0B0B0D;      /* the app icon's ink */
  --dim: #55554C;
  --line: #D6D6C6;
  --yes: #1F6B3A;      /* the accent: it happened */
  --yes-2: #185530;    /* hover */
  --on-yes: #F6F6EA;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #121210; --paper-2: #1C1C19; --ink: #F2F2E6; --dim: #A9A99C; --line: #2E2E28;
          --yes: #5FBF85; --yes-2: #7ACF9B; --on-yes: #0B0B0D; }
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0 auto; padding: 0 24px 72px; max-width: 760px; color: var(--ink);
       font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
       -webkit-font-smoothing: antialiased; }

h1, h2, h3, .brand, .ask { font-family: "Newsreader", "Iowan Old Style", Georgia, serif; font-optical-sizing: auto; }
h1 { font-size: 2.4rem; line-height: 1.12; font-weight: 500; letter-spacing: -0.01em; margin: 0 0 0.5em; }
main > h1 { margin-top: 2.2rem; }
h2 { font-size: 1.6rem; line-height: 1.2; font-weight: 550; margin: 2.3em 0 0.5em; }
h3 { font-size: 1.15rem; font-weight: 600; margin: 1.6em 0 0.3em; }
p, li { max-width: 66ch; }
p { margin: 0 0 1em; }
.lede { font-size: 1.17rem; max-width: 34em; }
.date { color: var(--dim); margin-top: -0.4em; }
strong { font-weight: 650; }
ul { padding-left: 1.2em; }
li { margin-bottom: 0.4em; }
code { font: 0.9em/1.4 ui-monospace, "SF Mono", Menlo, monospace; background: var(--paper-2);
       padding: 0.1em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }

a { color: var(--yes); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--yes); outline-offset: 3px; border-radius: 2px; }

header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
         gap: 10px 20px; padding: 26px 0 18px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
         font-weight: 600; font-size: 1.3rem; }
.brand .mark { display: block; border-radius: 7px; }
nav { display: flex; flex-wrap: wrap; gap: 2px 18px; }
nav a { color: var(--dim); text-decoration: none; padding: 6px 0; }
nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }
nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* Home: the page opens with a question someone typed, and the one
   notification it will ever send them. */
.hero { margin: 3.4rem 0 2.4rem; }
.ask { font-style: italic; font-weight: 400; font-size: 3rem; line-height: 1.08;
       letter-spacing: -0.015em; margin: 0; max-width: 14em; }
.ask q { quotes: "\201C" "\201D"; }
.hero .lede { margin: 1.4rem 0 0; }

/* An iOS-style banner, drawn rather than screenshotted. */
.banner { display: grid; grid-template-columns: 38px 1fr; gap: 2px 12px; align-items: start;
          max-width: 400px; margin: 2rem 0 0; padding: 12px 14px 13px;
          border-radius: 18px; background: var(--paper-2); border: 1px solid var(--line);
          box-shadow: 0 10px 28px -14px rgba(11, 11, 13, 0.35); font-size: 0.93rem; line-height: 1.35; }
.banner img { grid-row: span 3; border-radius: 9px; }
.banner .top { display: flex; justify-content: space-between; color: var(--dim); font-size: 0.86em; }
.banner b { font-weight: 650; }
.banner .src { color: var(--dim); }
.banner .src::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
                       background: var(--yes); margin-right: 6px; vertical-align: 0.1em; }
@media (prefers-reduced-motion: no-preference) {
  .banner { animation: arrive 620ms cubic-bezier(.2, .9, .25, 1.15) 1.3s both; }
  @keyframes arrive { from { opacity: 0; transform: translateY(-22px) scale(.97); } }
}

.cta { display: inline-block; margin: 2rem 0 0; padding: 13px 22px; border-radius: 999px;
       background: var(--yes); color: var(--on-yes); font-weight: 650; text-decoration: none; }
.cta:hover { background: var(--yes-2); }
.cta:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.cta-note { color: var(--dim); font-size: 0.95em; margin: 0.8rem 0 0; }

.features { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; }
.features li { max-width: none; margin: 0; }
.features h3 { margin: 0 0 0.2em; }
.features p { margin: 0; color: var(--dim); font-size: 0.97em; }

/* How it works: a swimlane. Columns are where the work happens, rows are
   the three moments in a watch's life, in order. */
.lanes { margin: 1.6rem 0 1.4rem; display: grid; grid-template-columns: 7.2rem repeat(3, minmax(0, 1fr));
         gap: 0 24px; font-size: 0.9rem; line-height: 1.4; }
.lanes .col { font-weight: 650; padding: 0 0 10px; border-bottom: 2px solid var(--ink); }
.lanes .col small { display: block; font-weight: 400; color: var(--dim); }
.lanes .moment { font-family: "Newsreader", Georgia, serif; font-style: italic; font-size: 1.2rem;
                 line-height: 1.2; padding-top: 16px; border-bottom: 1px solid var(--line); }
.lanes .cell { position: relative; padding: 16px 0 18px; border-bottom: 1px solid var(--line); }
.lanes .cell p { margin: 0; max-width: none; }
.lanes .cell p + p { margin-top: 6px; color: var(--dim); }
.lanes .box { background: var(--paper-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
.lanes .fire { border-color: var(--yes); box-shadow: inset 3px 0 0 var(--yes); }
.lanes .empty { color: var(--dim); font-style: italic; }
/* Arrows between neighbouring cells: → sends right, ← sends back. */
.lanes .to::after, .lanes .from::after, .lanes .both::after { position: absolute; top: 25px; right: -21px;
                                         font-size: 1.2rem; font-weight: 600; color: var(--ink); line-height: 1; }
.lanes .to::after { content: "\2192"; }
.lanes .from::after { content: "\2190"; }
.lanes .both::after { content: "\21C4"; }
.legend { color: var(--dim); font-size: 0.92em; }

.small { font-size: 0.95em; color: var(--dim); }

table { border-collapse: collapse; margin: 1rem 0 1.5rem; width: 100%; font-size: 0.95em; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); }
th { font-weight: 650; }
td:first-child { white-space: nowrap; font-weight: 650; }

footer { margin-top: 72px; padding-top: 22px; border-top: 1px solid var(--line);
         color: var(--dim); font-size: 0.9em; display: flex; flex-wrap: wrap; gap: 6px 22px; }
footer a { color: var(--dim); }
footer a:hover { color: var(--ink); }

@media (max-width: 640px) {
  h1 { font-size: 2rem; }
  .ask { font-size: 2.2rem; }
  .hero { margin-top: 2.4rem; }
  nav { gap: 0 14px; font-size: 0.95em; }
  .cta { display: block; text-align: center; }
  /* The swimlane stacks: each moment becomes a block, each cell names its column. */
  .lanes { display: block; font-size: 0.95rem; }
  .features { grid-template-columns: 1fr; }
  .lanes .col, .lanes .empty { display: none; }
  .lanes .moment { font-size: 1.35rem; padding: 26px 0 6px; border-bottom: 2px solid var(--ink); }
  .lanes .cell { padding: 12px 0 12px; border: 0; }
  .lanes .cell::before { content: attr(data-col); display: block; font-weight: 650; margin-bottom: 4px; }
  .lanes .to::after, .lanes .from::after, .lanes .both::after, .legend { display: none; }
  table, tr, td { display: block; }
  tr:first-child { display: none; }
  tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  td { padding: 2px 0; border: 0; }
  td:first-child { white-space: normal; font-size: 1.05em; margin-bottom: 4px; }
  td:nth-child(2)::before { content: "Receives: "; color: var(--dim); }
  td:nth-child(3)::before { content: "Why: "; color: var(--dim); }
}
