/* got2.app — the company layer.
 *
 * This file carries no accent colour. --accent, --band and --btn-border are
 * Simple's and live in theme-simple.css on .theme-simple, never on :root. That
 * scoping is the single decision the whole design rests on, and it is invisible
 * in a screenshot: it is what lets an unrelated product sit in this shell later
 * without an argument with this one.
 *
 * Both themes are custom properties. Component rules never carry literal hex —
 * the design renders had to, because a PNG cannot hold a media query, and that
 * produced exactly one bug: a paragraph inheriting light ink onto a dark canvas.
 * With properties it cannot happen.
 */

:root {
  color-scheme: light dark;

  --canvas:       #F6F5F1;
  --paper:        #FFFFFF;
  --paper-raised: #FBFAF7;
  --ink:          #111315;
  --muted:        #68717C;
  --line:         #DDE1E5;
  --line-soft:    #E4E1DA;   /* the header rule, which sits on canvas */

  --serif: "New York", "Iowan Old Style", Georgia, serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:  ui-monospace, SFMono-Regular, Menlo, monospace;
  --brand: "Avenir Next", Avenir, -apple-system, sans-serif;

  --gutter: 72px;
  --rhythm: 96px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas:       #111418;
    --paper:        #191D22;
    --paper-raised: #20252B;
    --ink:          #F4F6F8;
    --muted:        #A5ADB7;
    --line:         #30363D;
    --line-soft:    #262C33;
  }
}

@media (max-width: 900px) {
  :root { --gutter: 24px; --rhythm: 48px; }
}

/* ---------------------------------------------------------------- reset */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 17px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

/* Never removed, only ever replaced by something that measures 3:1 against
   both the control and what is behind it. The 2px offset is what keeps the
   ring visible against a filled button rather than merging with it. */
:focus-visible {
  outline: 3px solid var(--accent-ring, var(--muted));
  outline-offset: 2px;
}

/* ------------------------------------------------------------ typography */

.serif { font-family: var(--serif); font-weight: 400; }

.eyebrow {
  font: 600 11px/1.2 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.lede {
  max-width: 40rem;
  font-size: 19px;
  line-height: 1.6;
  color: var(--muted);
}

.prose { max-width: 800px; }
.prose p { color: var(--muted); }
.prose p + p { margin-top: 18px; }

.small { font-size: 13px; line-height: 1.6; color: var(--muted); }

/* ---------------------------------------------------------------- layout */

/* Content is full-bleed and the gutter is padding on each section, not a
   centred wrapper — bands have to reach both window edges. */
.section { padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------------------------------------------------------------- header */

.shell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 36px var(--gutter);
  border-bottom: 1px solid var(--line-soft);
  /* Not sticky. It scrolls away. */
}

.shell-brand {
  font: 400 17px/1 var(--serif);
  color: var(--ink);
  text-decoration: none;
}

.shell-nav { display: flex; gap: 28px; font-size: 14px; }
.shell-nav a { color: var(--muted); text-decoration: none; }
.shell-nav a:hover { color: var(--ink); }
/* The current page is bold AND not a link — nothing here communicates by
   colour alone. */
.shell-nav [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------- footer */

.shell-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: var(--rhythm);
  padding: 30px var(--gutter);
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.shell-footer a { color: var(--muted); }
.shell-footer a:hover { color: var(--ink); }
.shell-footer-links { display: flex; gap: 24px; }

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  font: 600 15px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  /* Without these a flex row squashes the button and wraps its label instead
     of wrapping the row. */
  white-space: nowrap;
  flex-shrink: 0;
}

.btn:active { transform: translateY(1px); }

.btn-secondary {
  background: var(--paper);
  border-color: var(--btn-border, var(--line));
  color: var(--ink);
}
.btn-secondary:hover { background: var(--paper-raised); border-color: #9FB0BC; }

@media (prefers-color-scheme: dark) {
  /* It loses its fill in dark on purpose: a filled pale button beside a filled
     blue one competes at dark-mode contrast levels. */
  .btn-secondary { background: transparent; border-color: #3C4652; }
  .btn-secondary:hover { background: var(--paper); border-color: #55616F; }
}

/* ------------------------------------------------------- shared sections */

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
}

/* A 2px ink rule, not a hairline, so the three read as deliberate columns
   rather than table rows. */
.principle { border-top: 2px solid var(--ink); padding-top: 16px; }
.principle h3 { font: 600 15px/1.3 var(--sans); color: var(--ink); }
.principle p { margin-top: 8px; font-size: 14px; line-height: 1.65; color: var(--muted); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 56px;
}
.feature h3 { font: 600 15px/1.3 var(--sans); color: var(--ink); }
.feature p { margin-top: 8px; font-size: 14px; line-height: 1.65; color: var(--muted); }

/* Everything is open — no accordions. They need JavaScript, and Apple's
   reviewer should not have to click to read a policy. */
.item { border-top: 1px solid var(--line); padding: 26px 0; }
.item:last-child { border-bottom: 1px solid var(--line); }
.item h3 { font: 600 17px/1.4 var(--sans); color: var(--ink); }
.item p { margin-top: 10px; font-size: 16px; line-height: 1.7; color: var(--muted); }
.item code { font: 14px var(--mono); color: inherit; }

.clause { padding: 28px 0; }
.clause h3 { font-size: 18px; line-height: 1.35; }

/* ----------------------------------------------------------- breakpoint */

/* One breakpoint. Nothing here has more than two columns, so an intermediate
   step would be ceremony. */
@media (max-width: 900px) {
  body { font-size: 15px; line-height: 1.65; }

  .shell-header { padding: 20px var(--gutter); }
  .shell-brand { font-size: 15px; }
  .shell-nav { gap: 16px; font-size: 13px; }

  .shell-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 22px var(--gutter);
    margin-top: var(--rhythm);
  }

  .lede { font-size: 16px; }
  .eyebrow { font-size: 10px; }
  .small { font-size: 12px; }

  .principles { grid-template-columns: 1fr; gap: 26px; }
  .feature-grid { grid-template-columns: 1fr; gap: 22px; }

  .item { padding: 20px 0; }
  .item h3 { font-size: 16px; }
  .clause { padding: 22px 0; }
  .clause h3 { font-size: 17px; }

  /* Full width, stacked. Side by side at 390px leaves labels ~150px wide and
     they wrap. */
  .actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .btn { min-height: 48px; width: 100%; }
}
