/* farsideapp.com. Dark by default; light is chosen with the toggle (theme.js).
   Colours are placeholders until the palette is agreed (docs/BACKLOG.md). */

@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --bg: #0d0f0e; --surface: #151817; --line: #262b29;
  --text: #e9ece9; --muted: #949b97;
  --accent: #c9ad6e; --btn: #7d5f18; --on-btn: #fbf9f4; --frame: #232725;
  /* The terminal stays dark in both themes, like a real screen. */
  --t-text: #d6dbd8; --t-prompt: #c9ad6e; --t-ok: #8fd6a0; --t-dim: #7a817d;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f2ea; --surface: #fbf9f4; --line: #d9d4c7;
  --text: #1a1915; --muted: #6b675d;
  --accent: #8a6410; --btn: #8a6410; --on-btn: #fbf9f4; --frame: #1a1915;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--sans); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10; }

header { border-bottom: 1px solid var(--line); }
nav { display: flex; align-items: center; gap: 24px; height: 64px; }
.word { font: 600 18px var(--mono); letter-spacing: -0.02em; text-decoration: none; margin-right: auto; }
.word span { color: var(--accent); }
nav a.link { color: var(--muted); text-decoration: none; font-size: 15px; display: none; }
nav a.link:hover { color: var(--text); }
@media (min-width: 720px) { nav a.link { display: inline; } }
.btn { display: inline-block; font: 600 15px var(--mono); background: var(--btn); color: var(--on-btn); text-decoration: none; padding: 10px 16px; border-radius: 6px; border: 0; cursor: pointer; }
.btn:hover { filter: brightness(1.12); }
.theme { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 6px; width: 38px; height: 38px; font: 16px var(--mono); cursor: pointer; }
.theme:hover { color: var(--text); }

.hero { display: grid; gap: 48px; padding: 72px 0 88px; align-items: center; }
@media (min-width: 960px) { .hero { grid-template-columns: 1fr 1.15fr; } }
.eyebrow { font: 500 13px var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 16px; }
h1 { font: 600 clamp(36px, 6vw, 60px)/1.05 var(--mono); letter-spacing: -0.035em; margin: 0 0 24px; }
.sub { color: var(--muted); font-size: 19px; max-width: 34em; margin: 0 0 32px; }

.signup { max-width: 460px; }
.signup .row { display: flex; flex-wrap: wrap; gap: 8px; }
.signup input[type="email"] { flex: 1 1 220px; min-width: 0; font: 16px var(--mono); background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; }
.signup .cf-turnstile { margin-top: 12px; min-height: 0; }
/* A field people never see; bots fill it in. */
.signup .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fine { font: 13px var(--mono); color: var(--muted); margin: 12px 0 0; }

/* The hero: an animated drawing of the iPad app (DECISIONS.md #40), until a real
   capture replaces it (docs/BACKLOG.md). Three scenes on one 18 s loop: the list of
   Macs, the Mac's screen, the terminal. Sized in em off the frame's width (cqw), so it
   scales as one picture. The app stays dark in both site themes, like a real screen. */
.ipad { background: #000; border: 10px solid var(--frame); border-radius: 22px; aspect-ratio: 4 / 3; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.45); container-type: inline-size; position: relative; }
.ui { position: absolute; inset: 0; font: 2.1cqw/1.3 -apple-system, BlinkMacSystemFont, "Helvetica Neue", var(--sans); color: #fff; letter-spacing: -0.01em; }
.ui b { font-weight: 600; } .ui small { display: block; font-size: .78em; color: rgba(235,235,245,.6); } .ui i { font-style: normal; }
.ui .w { color: #ffb340; } .ui .p { color: #c9ad6e; } .ui .ok { color: #8fd6a0; } .ui .dim { color: #7a817d; }
.scene { position: absolute; inset: 0; opacity: 0; animation: 18s linear infinite; }
.s1 { display: flex; animation-name: s1; } .s2 { background: #20272a; animation-name: s2; } .s3 { display: flex; flex-direction: column; background: #0b0c0c; animation-name: s3; }
@keyframes s1 { 0%, 29% { opacity: 1; } 32%, 97% { opacity: 0; } 100% { opacity: 1; } }
@keyframes s2 { 0%, 29% { opacity: 0; } 32%, 63% { opacity: 1; } 66%, 100% { opacity: 0; } }
@keyframes s3 { 0%, 63% { opacity: 0; } 66%, 95% { opacity: 1; } 98%, 100% { opacity: 0; } }

/* Scene 1: the list of Macs, in Apple's grouped-list style. */
.side { width: 30%; background: #1c1c1e; padding: 0 .8em; box-sizing: border-box; }
.side-add { text-align: right; color: #c9ad6e; font-size: 1.5em; height: 1.9em; line-height: 1.9em; }
.side-title { font-size: 2em; font-weight: 700; margin: 0 .15em .4em; }
.mac { display: flex; align-items: center; padding: .55em .7em; border-radius: .7em; margin-bottom: .15em; }
.mac span { flex: 1; } .mac.off { color: rgba(235,235,245,.6); }
.mac.sel { background: #c9ad6e; color: #1c1a14; } .mac.sel small { color: rgba(28,26,20,.75); }
.mac em { font-style: normal; font-size: .8em; font-weight: 600; background: #1c1a14; color: #c9ad6e; border-radius: 1em; min-width: 1.5em; text-align: center; padding: .1em .3em; }
.detail { flex: 1; padding: 0 1.8em; }
.bar { display: flex; justify-content: flex-end; gap: .6em; height: 2.9em; align-items: center; }
.pill { position: relative; font-size: .9em; font-weight: 600; padding: .45em 1em; border-radius: 1.2em; background: #2c2c2e; color: #c9ad6e; }
.pill.pri { background: #c9ad6e; color: #1c1a14; }
.h { font-size: 2em; font-weight: 700; } .sub2 { color: rgba(235,235,245,.6); font-size: .9em; }
.sec { color: rgba(235,235,245,.6); font-weight: 600; font-size: .9em; margin: 1.4em .9em .45em; }
.group { background: #1c1c1e; border-radius: .75em; }
.row { display: flex; align-items: center; gap: .8em; padding: .6em .9em; border-bottom: .5px solid rgba(84,84,88,.65); }
.row:last-child { border-bottom: 0; }
.dot { width: .6em; height: .6em; border-radius: 50%; flex: none; }
.dot.wait { background: #ff9f0a; } .dot.done { background: #30d158; } .dot.work { border: .14em solid #c9ad6e; box-sizing: border-box; }
.s1 .row:first-child .dot { animation: 18s infinite pulse; }
@keyframes pulse { 0%, 4%, 12%, 20%, 100% { box-shadow: 0 0 0 0 rgba(255,159,10,0); } 8%, 16% { box-shadow: 0 0 0 .35em rgba(255,159,10,.35); } }

/* A fingertip: a soft circle that presses and fades. */
.tap { position: absolute; width: 2.4em; height: 2.4em; margin: -1.2em 0 0 -1.2em; left: 50%; top: 50%; border-radius: 50%; background: rgba(255,255,255,.55); opacity: 0; animation: 18s linear infinite; pointer-events: none; }
.t1 { animation-name: t1; } .t2 { animation-name: t2; } .t3 { animation-name: t3; }
@keyframes t1 { 0%, 21% { opacity: 0; transform: scale(.6); } 23% { opacity: .9; transform: scale(1); } 27%, 100% { opacity: 0; transform: scale(1.4); } }
@keyframes t2 { 0%, 36% { opacity: 0; transform: scale(.6); } 38% { opacity: .9; transform: scale(1); } 41%, 100% { opacity: 0; transform: scale(1.4); } }
@keyframes t3 { 0%, 47% { opacity: 0; transform: scale(.6); } 49% { opacity: .9; transform: scale(1); } 52%, 100% { opacity: 0; transform: scale(1.4); } }

/* Scene 2: the Mac's screen, with glass only on the floating toolbar. */
.win { position: absolute; left: 5%; top: 14%; width: 66%; border-radius: .6em; background: #111415; border: 1px solid #30383a; overflow: hidden; }
.wt { background: #1b2022; color: #7a817d; font: .72em var(--mono); padding: .45em .9em; }
.wb { font: .8em/1.75 var(--mono); padding: .7em 1em 1em; color: #d6dbd8; }
.wb .q { color: #e8b062; }
.ans, .ans2 { opacity: 0; animation: 18s steps(1) infinite; } .ans { animation-name: ans; } .ans2 { animation-name: ans2; }
@keyframes ans { 0%, 54% { opacity: 0; } 55%, 100% { opacity: 1; } }
@keyframes ans2 { 0%, 57% { opacity: 0; } 58%, 100% { opacity: 1; } }
.glass { position: absolute; top: .8em; height: 2.6em; display: flex; align-items: center; border-radius: 1.3em; background: rgba(40,44,46,.55); -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6); border: .5px solid rgba(255,255,255,.18); padding: 0 1em; }
.back { left: .9em; color: #c9ad6e; }
.ttl { left: 50%; transform: translateX(-50%); flex-direction: column; justify-content: center; line-height: 1.1; font-size: .9em; } .ttl small { font-size: .7em; }
.tools { right: .9em; gap: 1em; color: #fff; font-size: .9em; }
.tools svg { width: 1.3em; height: 1.3em; display: block; }
.bell { position: relative; } .bell .badge { position: absolute; top: -.05em; right: -.1em; width: .45em; height: .45em; border-radius: 50%; background: #ff9f0a; }
.pop { position: absolute; right: .9em; top: 4em; width: 34%; border-radius: 1.2em; background: rgba(44,44,46,.94); box-shadow: 0 1em 3em rgba(0,0,0,.5); padding: .4em 0 .5em; opacity: 0; transform-origin: 80% 0; animation: 18s ease-out infinite pop; }
@keyframes pop { 0%, 38% { opacity: 0; transform: scale(.96); } 40%, 51% { opacity: 1; transform: none; } 53%, 100% { opacity: 0; transform: scale(.96); } }
.ph { color: rgba(235,235,245,.6); font-size: .75em; font-weight: 600; padding: .5em 1.2em .3em; }
.prow { position: relative; display: flex; align-items: center; gap: .7em; padding: .45em 1.2em; font-size: .9em; }
.prow .tap { left: 40%; }

/* Scene 3: the terminal over SSH, the free tier's mode. */
.tbar { display: flex; height: 2.7em; border-bottom: 1px solid #222624; font: .85em var(--mono); color: #949b97; }
.tbar > span { display: flex; align-items: center; padding: 0 1.1em; border-right: 1px solid #222624; }
.tbar i { color: #6f7672; margin-left: .5em; }
.tab.on { background: #121514; color: #e9ece9; box-shadow: inset 0 -2px 0 #c9ad6e; }
.tb-end { margin-left: auto; border-right: 0 !important; border-left: 1px solid #222624; color: #d6dbd8; }
.tty { flex: 1; font: .9em/1.8 var(--mono); padding: 1em 1.3em; color: #d6dbd8; }
.l1, .l2, .l3, .l4 { opacity: 0; animation: 18s steps(1) infinite; }
.l1 { animation-name: l1; } .l2 { animation-name: l2; } .l3 { animation-name: l3; } .l4 { animation-name: l4; }
@keyframes l1 { 0%, 69% { opacity: 0; } 70%, 100% { opacity: 1; } }
@keyframes l2 { 0%, 75% { opacity: 0; } 76%, 100% { opacity: 1; } }
@keyframes l3 { 0%, 80% { opacity: 0; } 81%, 100% { opacity: 1; } }
@keyframes l4 { 0%, 85% { opacity: 0; } 86%, 100% { opacity: 1; } }
.keys { display: flex; height: 3em; border-top: 1px solid #222624; background: #101211; font: .85em var(--mono); color: #d6dbd8; }
.keys span { flex: 1; display: flex; align-items: center; justify-content: center; border-right: 1px solid #222624; }
.keys span:last-child { border-right: 0; } .keys .on { background: #2a2416; color: #e0c78c; }

/* Reduced motion: hold on the first scene, still. */
@media (prefers-reduced-motion: reduce) {
  .scene, .tap, .pop, .ans, .ans2, .l1, .l2, .l3, .l4, .s1 .row:first-child .dot { animation: none; }
  .s1 { opacity: 1; }
}

section { padding: 88px 0; border-top: 1px solid var(--line); }
h2 { font: 600 clamp(26px, 3.5vw, 36px)/1.15 var(--mono); letter-spacing: -0.03em; margin: 0 0 12px; }
.lede { color: var(--muted); max-width: 40em; margin: 0 0 48px; }

.moment { display: grid; gap: 16px; }
@media (min-width: 760px) { .moment { grid-template-columns: repeat(3, 1fr); } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 24px; }
.panel .n { font: 500 13px var(--mono); color: var(--accent); }
.panel p { margin: 8px 0 0; font-size: 19px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; counter-reset: s; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: s; padding: 20px 20px 20px 0; border-top: 2px solid var(--line); }
.steps li::before { content: "0" counter(s); font: 600 13px var(--mono); color: var(--accent); display: block; margin-bottom: 8px; }
.steps li:first-child { border-top-color: var(--accent); }
.steps b { display: block; font-weight: 600; }
.steps span { color: var(--muted); font-size: 15px; }
.note { font: 14px var(--mono); color: var(--muted); margin-top: 24px; }

.tiles { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
@media (min-width: 760px) { .tiles { grid-template-columns: 1fr 1fr; } }
.tile { background: var(--bg); padding: 28px; }
.tile h3 { font: 600 18px var(--mono); margin: 0 0 6px; }
.tile p { color: var(--muted); margin: 0; }

.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; max-width: 44em; }
.facts li { padding-left: 28px; position: relative; }
.facts li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); }

.two { display: grid; gap: 32px; }
@media (min-width: 760px) { .two { grid-template-columns: 1fr 1fr; } }
.spec { font: 15px/1.9 var(--mono); }
.spec dt { color: var(--muted); } .spec dd { margin: 0 0 12px; }
h3.small { font: 600 20px var(--mono); margin: 32px 0 12px; }

details { border-top: 1px solid var(--line); padding: 16px 0; max-width: 44em; }
summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); margin: 8px 0 0; }

.cta { text-align: center; }
.cta .signup { margin: 24px auto 0; text-align: left; }

/* Privacy, support and the small pages. */
.prose { max-width: 44em; padding: 64px 0 88px; }
.prose h1 { font-size: clamp(32px, 5vw, 44px); }
.prose h2 { font-size: 22px; margin-top: 40px; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--text); }
.prose a { color: var(--accent); }

footer { border-top: 1px solid var(--line); padding: 32px 0 48px; font: 14px var(--mono); color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--text); }
