/* S-4 Studio site. The tones, the type and the shapes are the apps' own:
   a dark desk by default, a light one for daylight, plates told apart by tone. */

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/JetBrainsMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/JetBrainsMono-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark light;
  --ground: #050505;
  --canvas: #0a0a0a;
  --plate: #101010;
  --key: #1d1d1b;
  --key-hover: #262624;
  --hairline: #222220;
  --ink: #f2f2f0;
  --ink2: #c4c4c0;
  --ink3: #8c8c88;
  --ink4: #5f5f5b;
  --listen: #5fa3db;
  --live: #6fb98f;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --step: clamp(3.5rem, 8vw, 6.5rem);
}
@media (prefers-color-scheme: light) {
  :root {
    --ground: #e3e3e0;
    --canvas: #ecece9;
    --plate: #f4f4f1;
    --key: #fbfbf9;
    --key-hover: #ffffff;
    --hairline: #d2d2ce;
    --ink: #161614;
    --ink2: #3c3c39;
    --ink3: #62625e;
    --ink4: #9b9b97;
    --listen: #2f7fba;
    --live: #3e8e63;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink2);
  font: 400 1rem/1.62 var(--sans);
}
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--ink); text-decoration-color: var(--ink3); text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--listen); outline-offset: 3px; border-radius: 4px; }
p, ul, ol, dl, h1, h2, h3 { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.wrap { max-width: 1260px; margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -100rem; }
.skip:focus { left: var(--gutter); top: 0.5rem; z-index: 2; background: var(--ink); color: var(--ground); padding: 0.5rem 0.75rem; }

/* Top bar */
.top { background: var(--canvas); }
.top-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; padding-block: 0.85rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; padding-block: 0.9rem; margin-block: -0.9rem; font: 800 0.8125rem/1 var(--mono); letter-spacing: 0.08em; color: var(--ink); text-decoration: none; }
.mark { fill: currentColor; }
.top nav { display: flex; gap: 0.25rem; padding: 0.25rem; background: var(--plate); border-radius: 999px; }
.top nav a { position: relative; font: 500 0.8125rem/1 var(--mono); letter-spacing: 0.02em; color: var(--ink3); text-decoration: none; padding: 0.55rem 0.95rem; border-radius: 999px; }
.top nav a::after { content: ""; position: absolute; inset: -0.45rem 0; }
.top nav a:hover { color: var(--ink); }
.top nav a[aria-current="page"] { background: var(--ink); color: var(--ground); }

/* Type */
h1, h2, h3, .label, .chip, .num { font-family: var(--mono); }
h1 { font-weight: 800; font-size: clamp(1.9rem, 4.6vw, 3.4rem); line-height: 1.06; letter-spacing: -0.015em; color: var(--ink); text-wrap: balance; max-width: 20ch; }
h2 { font-weight: 800; font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.15; letter-spacing: -0.005em; color: var(--ink); text-wrap: balance; }
h3 { font-weight: 800; font-size: 1rem; line-height: 1.3; color: var(--ink); }
.label { display: block; font-weight: 500; font-size: 0.6875rem; line-height: 1.2; letter-spacing: 0.14em; color: var(--ink3); max-width: none; }
.lede { font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.55; color: var(--ink2); max-width: 62ch; }
.note { font-size: 0.875rem; color: var(--ink3); max-width: 62ch; }

/* Page opening */
.hero { background: var(--canvas); padding-block: clamp(2.5rem, 6vw, 5rem) var(--step); }
.hero .wrap > * + * { margin-top: 1.4rem; }
.hero .shot { margin-top: clamp(2rem, 5vw, 3.5rem); }
.state { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.25rem; }
.state p { max-width: 54ch; }
.dot { display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--live); margin-right: 0.55rem; vertical-align: 0.05em; }

/* Chips: the apps' capsule keys */
.chip { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 500; font-size: 0.8125rem; line-height: 1; letter-spacing: 0.03em; padding: 0.8rem 1.15rem; border-radius: 999px; background: var(--key); color: var(--ink); text-decoration: none; }
.chip:hover { background: var(--key-hover); }
.chip.solid { background: var(--ink); color: var(--ground); }
.chip.solid:hover { background: var(--ink2); }
.tag { display: inline-block; text-decoration: none; font: 500 0.625rem/1 var(--mono); letter-spacing: 0.14em; color: var(--ground); background: var(--ink3); padding: 0.3rem 0.45rem; border-radius: 4px; vertical-align: 0.3em; margin-left: 0.6rem; }

/* Screenshots: flat interface, no device around it */
.shot { background: var(--canvas); border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--hairline); }
.shot img { width: 100%; }

/* Sections */
.band { padding-block: var(--step); }
.band + .band { padding-top: 0; }
.band.sunk { background: var(--canvas); padding-top: var(--step); }
.head { display: grid; gap: 1rem 3rem; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
.head .label { margin-bottom: 0.9rem; }
.head p + p { margin-top: 0.9rem; }
.head + .shot, .head + .grid, .head + .plates, .head + .needs { margin-top: clamp(1.75rem, 4vw, 3rem); }

.plates { display: grid; gap: 0.75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.plate { background: var(--plate); border-radius: 12px; padding: clamp(1.25rem, 3vw, 2rem); display: flex; flex-direction: column; gap: 0.9rem; }
.plate .chip { align-self: flex-start; margin-top: auto; }
.plate ul { display: grid; gap: 0.5rem; }
.plate li { padding-left: 1.1rem; position: relative; }
.plate li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 0.4rem; height: 2px; background: var(--ink4); }

.grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cell { background: var(--plate); border-radius: 12px; padding: 1.4rem 1.5rem 1.6rem; }
.cell .label { margin-bottom: 0.7rem; color: var(--ink); }
.plate > .label { margin-bottom: -0.2rem; }
.cell p { font-size: 0.9375rem; }

.steps { counter-reset: step; display: grid; gap: 0.75rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0 0.5rem; background: var(--plate); border-radius: 12px; padding: 1.1rem 1.4rem; }
.steps li::before { content: counter(step); font: 800 1rem/1.62 var(--mono); color: var(--ink); }
.needs { display: grid; gap: 0.75rem; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
/* The connection drawn: the S-4, its cable, the adapter, the iPad */
.chain { margin: 0; background: var(--plate); border-radius: 12px; padding: 1.25rem; }
.chain svg { width: 100%; height: auto; }
.chain .body { fill: var(--key); }
.chain .dim { fill: var(--hairline); }
.chain .hi { fill: var(--ink2); }
.chain .line { stroke: var(--ink3); stroke-width: 3; fill: none; }
.chain text { font: 500 11px var(--mono); letter-spacing: 0.14em; fill: var(--ink3); }
.chain text.plain { letter-spacing: 0.02em; font-size: 13px; }

.qa { display: grid; gap: 0.75rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.label + .qa { margin-top: 1.25rem; }
.head .state { margin-top: 1.1rem; }
.prose .label { margin-bottom: 1rem; }
.qa > div { background: var(--plate); border-radius: 12px; padding: 1.4rem 1.5rem 1.6rem; }
.qa h3 { margin-bottom: 0.6rem; }
.qa p { font-size: 0.9375rem; }
.more { margin-top: 1.5rem; }

/* Long text: Support, Privacy, Terms */
.prose { background: var(--canvas); padding-block: clamp(2.5rem, 6vw, 4.5rem) var(--step); }
.prose .wrap { max-width: calc(46rem + 2 * var(--gutter)); }
.prose h1 { max-width: none; }
.prose h2 { margin-top: 3rem; padding-top: 1.75rem; border-top: 1px solid var(--hairline); }
.prose h3 { margin-top: 1.9rem; }
.prose p, .prose ol, .prose ul { margin-top: 0.9rem; }
.prose ol { list-style: decimal; padding-left: 1.4rem; }
.prose ul { list-style: disc; padding-left: 1.4rem; }
.prose li + li { margin-top: 0.4rem; }
.prose .lede { margin-top: 1.25rem; }
.prose .note { margin-top: 1rem; }
.prose address { font-style: normal; margin-top: 0.9rem; }

/* Foot */
.foot { padding-block: 2.5rem 3.5rem; font-size: 0.8125rem; line-height: 1.6; color: var(--ink3); }
.foot p { max-width: 88ch; margin-top: 0.8rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-bottom: 1.5rem; }
.foot-links a { font: 500 0.8125rem/1.4 var(--mono); color: var(--ink2); text-decoration: none; padding-block: 0.35rem; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 860px) {
  .head, .needs { grid-template-columns: minmax(0, 1fr); }
  .grid, .qa { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .plates, .grid, .grid.two, .qa { grid-template-columns: minmax(0, 1fr); }
  .shot { border-radius: 8px; }
  .top nav a { padding-inline: 0.75rem; }
}
