/* Get Better Software — site layout.
 * Every colour, size, radius, shadow, duration and easing is a token from colors_and_type.css.
 * Motion: ring/dot entrance uses duration tokens; ring rotation is scroll-linked. Text and exits are never animated.
 * All motion sits behind prefers-reduced-motion: no-preference, and nothing depends on it to be visible. */

html { background: var(--bg); color: var(--fg-1); font-family: var(--font-sans); -webkit-text-size-adjust: 100%; color-scheme: light; }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--s-5); box-sizing: border-box; }
main { flex: 1; }
img { display: block; }

/* header */
.site-header { position: relative; z-index: 2; padding-block: var(--s-6) 0; }
.site-header img { width: 40px; height: 40px; }
.home-link { display: inline-block; }

/* ── hero ─────────────────────────────────────────────────────────────── */
.hero { overflow-x: clip; }   /* the ring field bleeds off the right edge without widening the page */
.home { position: relative; padding-block: var(--s-7) 0; }
.intro { position: relative; z-index: 1; margin-bottom: var(--s-7); }
.intro h1 { margin: 0; font-size: clamp(var(--t-36), 7.6vw, var(--t-64)); }   /* class="t-display" */
.intro p { display: flex; align-items: center; gap: var(--s-3); margin: var(--s-5) 0 0; color: var(--fg-2); }
.intro p::before { content: ""; flex: none; width: var(--s-7); height: 1px; background: var(--border-strong); }

/* the ring field: the mark's ring and Sprout dot, drawn large behind the headline */
.rings { position: absolute; z-index: 0; top: calc(-1 * var(--s-10)); right: -34vw; width: 92vw; max-width: 640px; height: auto; overflow: visible; pointer-events: none; }
.ring { stroke: var(--stone-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ring.r2 { stroke: var(--stone-3); }
.dot { fill: var(--sprout); }
.rings-turn, .ring, .dot { transform-box: fill-box; transform-origin: center; }

/* ── product panel: the dark window onto Shot Brief ───────────────────── */
.product { position: relative; z-index: 1; isolation: isolate; overflow: hidden; display: grid;
           background: var(--ink); color: var(--paper); border-radius: var(--r-lg); padding: var(--s-6); }
.product::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: repeating-radial-gradient(circle at 50% 100%, transparent 0 calc(var(--s-11) - 1px), var(--ink-soft) calc(var(--s-11) - 1px) var(--s-11)); }
.product-copy { display: flex; flex-direction: column; gap: var(--s-6); }
.product-head { display: flex; align-items: center; gap: var(--s-4); }
.icon-tile { flex: none; width: 64px; height: 64px; border-radius: var(--r-md); background: var(--ink-soft); overflow: hidden; }
.icon-tile img { width: 100%; height: 100%; }
.product h2 { margin: 0; color: var(--paper); }            /* class="t-h2" */
.product .desc { margin: 0; font-size: var(--t-22); font-weight: 300; line-height: 1.15; letter-spacing: -0.02em; color: var(--paper); }
.product .platform { width: fit-content; margin: var(--s-4) 0 0; padding: var(--s-1) var(--s-3); border: 1px solid var(--stone-5); border-radius: var(--r-pill); color: var(--stone-2); } /* class="t-label" */
.cta { display: flex; justify-content: center; align-items: center; gap: var(--s-3); margin-top: var(--s-4);
       padding: var(--s-4) var(--s-6); border-radius: var(--r-pill); background: var(--accent); color: var(--ink);
       font-family: var(--font-sans); font-size: var(--t-16); font-weight: var(--w-semibold); line-height: 1; text-decoration: none; }
.cta::after { content: ""; flex: none; width: 7px; height: 7px; border-top: 2px solid; border-right: 2px solid; rotate: 45deg; }
.shot { display: none; height: auto; border-radius: var(--r-lg); rotate: 3deg; }

/* ── contact ──────────────────────────────────────────────────────────── */
.contact { padding-block: var(--s-6) 0; }
.contact h2 { margin: 0; color: var(--fg-2); }             /* class="t-label" */
.contact a { display: inline-block; margin-top: var(--s-2); padding-block: var(--s-1);
             font-size: var(--t-22); font-weight: 300; line-height: 1.2; letter-spacing: -0.02em; text-decoration-thickness: 1px; }

/* links (contact, footer, legal) */
a { color: var(--fg-1); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: var(--s-1); overflow-wrap: anywhere; }
.cta, .home-link { text-decoration: none; }

/* focus: ink on paper, paper on the ink panel */
:focus-visible { outline: 2px solid var(--fg-1); outline-offset: var(--s-1); border-radius: var(--r-sm); }
.product :focus-visible { outline-color: var(--paper); }
.cta:focus-visible { border-radius: var(--r-pill); }

/* footer (both pages) */
.site-footer { margin-top: var(--s-9); border-top: 1px solid var(--divider); padding-block: var(--s-7); }
.site-footer .wrap { display: flex; flex-direction: column; gap: var(--s-3); }
.site-footer .brand { display: flex; align-items: center; gap: var(--s-2); }
.site-footer img { width: 24px; height: 24px; }
.site-footer p { margin: 0; }                              /* class="t-body-sm" (fg-2) */
.site-footer .legal-link { padding-block: var(--s-2); display: inline-block; }

/* ── legal page ───────────────────────────────────────────────────────── */
.legal { padding-block: var(--s-9) 0; }
.legal h1 { margin: 0 0 var(--s-8); font-size: clamp(var(--t-36), 6vw, var(--t-64)); font-weight: 300; line-height: 1; letter-spacing: -0.04em; } /* .t-display metrics, fluid */
.legal section { border-top: 1px solid var(--border); padding-block: var(--s-6) var(--s-8); }
.legal h2 { margin: 0 0 var(--s-5); }                      /* class="t-h3" */
.legal p { margin: 0 0 var(--s-4); max-width: 65ch; color: var(--fg-2); } /* class="t-body" */
.legal p a { color: var(--fg-1); }
.legal ul { margin: var(--s-5) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--divider); }
.legal li { border-bottom: 1px solid var(--divider); }
.legal li a { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); padding-block: var(--s-4); text-decoration: none; font-weight: var(--w-medium); }
.legal li a::after { content: ""; flex: none; width: 7px; height: 7px; margin-right: var(--s-1); border-top: 2px solid; border-right: 2px solid; rotate: 45deg; }
/* the company record: the facts, set as a register entry */
.legal .record p { max-width: none; margin: 0; padding-block: var(--s-3); border-bottom: 1px solid var(--divider); color: var(--fg-1);
                   font-family: var(--font-mono); font-size: var(--t-14); font-weight: var(--w-medium); font-variant-numeric: tabular-nums; line-height: 1.45; }
.legal .record p:first-of-type { padding-block: 0 var(--s-5); font-family: var(--font-sans); font-size: var(--t-22); font-weight: 400; line-height: 1.25; }
.legal .record p:last-of-type { border-bottom: 0; }
.legal .updated { margin: var(--s-7) 0 0; color: var(--fg-3); font-family: var(--font-mono); font-size: var(--t-12); } /* class="t-body-sm" */

/* ── wider screens ────────────────────────────────────────────────────── */
@media (min-width: 720px) {
  .wrap { padding-inline: var(--s-7); }
  .site-header { padding-block: var(--s-7) 0; }
  .rings { top: calc(-1 * var(--s-11)); right: calc(-1 * var(--s-11)); width: 64vw; }
  .product { padding: var(--s-8); }
  .product .desc, .contact a { font-size: var(--t-28); }
  .cta { display: inline-flex; width: fit-content; }
  .site-footer .wrap { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: var(--s-6); }
}
@media (min-width: 1024px) {
  .home { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "intro product" "contact product";
          column-gap: var(--s-9); align-items: start; padding-block: var(--s-6) 0; }
  .intro { grid-area: intro; margin-bottom: 0; } .product { grid-area: product; } .contact { grid-area: contact; }
  .rings { top: calc(-1 * var(--s-10)); right: auto; left: calc(-1 * var(--s-11)); width: 640px; }
  .product { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s-7); }
  .product::before { background: repeating-radial-gradient(circle at calc(100% - var(--s-8) - var(--s-11)) 50%, transparent 0 calc(var(--s-11) - 1px), var(--ink-soft) calc(var(--s-11) - 1px) var(--s-11)); }
  .shot { display: block; width: calc(2 * var(--s-11)); align-self: center; }
  .site-footer { margin-top: var(--s-7); }
  .legal { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: var(--s-9); align-items: start; }
  .legal h1 { position: sticky; top: var(--s-7); margin: 0; }
  .legal-body { min-width: 0; }
}
@media (hover: hover) {
  a:hover { text-decoration-color: var(--fg-1); }
  .cta:hover { background: var(--accent-deep); }
  .cta:hover::after, .legal li a:hover::after { translate: var(--s-1) 0; }
  .product:hover .shot { rotate: 0deg; }
}
@media (prefers-reduced-motion: no-preference) {
  @keyframes ring-in { from { opacity: 0; transform: scale(0.94); } }
  @keyframes dot-in { from { opacity: 0; transform: scale(0); } }
  .ring { animation: ring-in var(--d-3) var(--ease-standard) both; }
  .ring.r3 { animation-delay: var(--d-1); }
  .ring.r2 { animation-delay: calc(2 * var(--d-1)); }
  .ring.r1 { animation-delay: calc(3 * var(--d-1)); }
  .ring.tick { animation-delay: calc(4 * var(--d-1)); }
  .dot { animation: dot-in var(--d-3) var(--ease-standard) calc(4 * var(--d-1)) both; }
  @media (hover: hover) {
    .cta { transition: background-color var(--d-1) var(--ease-standard); }
    .cta::after, .legal li a::after { transition: translate var(--d-2) var(--ease-standard); }
    .shot { transition: rotate var(--d-3) var(--ease-standard); }
  }
  @supports (animation-timeline: scroll()) {
    @keyframes turn { to { rotate: 80deg; } }
    .rings-turn { animation: turn linear both; animation-timeline: scroll(root block); animation-range: 0 100vh; }
  }
}
