/* Fonts are served from this site (see fonts/): Fraunces for headings, DM Sans for text (Latin and Latin Extended, so Turkish letters render in the same fonts). Both are SIL OFL 1.1. */
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-ext.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans.woff2") format("woff2"); font-weight: 100 1000; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-ext.woff2") format("woff2"); font-weight: 100 1000; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Flat, matte colors: paper and graphite with one calm teal. No gradients, no glow. */
:root {
  --serif: "Fraunces", ui-serif, "New York", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --bg: #eff1ee;
  --surface: #f7f9f6;
  --surface-2: #e5e9e4;
  --text: #1c211f;
  --muted: #5d6661;
  --line: #d6dcd6;
  --accent: #2e7a72;
  --accent-text: #ffffff;
  --term: #1a1f1d;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151918;
    --surface: #1c2120;
    --surface-2: #252b29;
    --text: #e8ece9;
    --muted: #98a29c;
    --line: #2d3532;
    --accent: #6cb7ad;
    --accent-text: #0f1413;
    --term: #0f1211;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.2rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.62 var(--sans); -webkit-font-smoothing: antialiased; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.4vw, 4.4rem); margin-bottom: 0.15em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.12rem; font-family: var(--sans); font-weight: 650; letter-spacing: 0; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: 3px; transition: color 0.2s var(--ease); }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
code { font: 0.88em var(--mono); background: var(--surface-2); padding: 0.1em 0.4em; border-radius: 6px; }

.icon { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-text); padding: 0.5rem 1rem; z-index: 20; }
.skip:focus { left: 0; }

.eyebrow { font: 600 0.8rem var(--mono); letter-spacing: 0.07em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }

/* header */
header.site { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.7rem; padding-bottom: 0.7rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; font-weight: 650; }
.mark { width: 1.6rem; height: 1.1rem; border: 2px solid var(--accent); border-radius: 0.6rem 0.6rem 0.75rem 0.75rem; position: relative; }
.mark::before, .mark::after { content: ""; position: absolute; top: 0.28rem; width: 0.2rem; height: 0.2rem; border-radius: 50%; background: var(--accent); }
.mark::before { left: 0.25rem; } .mark::after { right: 0.25rem; }
nav ul { display: flex; align-items: center; flex-wrap: wrap; gap: 0.3rem 1.2rem; list-style: none; margin: 0; padding: 0; font-size: 0.94rem; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--text); }
nav a.pill { color: var(--text); border: 1px solid var(--line); padding: 0.28rem 0.85rem; border-radius: 999px; transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease); }
nav a.pill:hover { border-color: var(--accent); background: var(--surface); }

/* hero */
.hero { padding: 4.5rem 0 4rem; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 3rem; align-items: center; }
.sub { font: 600 1.35rem/1.3 var(--serif); margin-bottom: 1rem; text-wrap: balance; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 36rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 1rem; }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1.25rem; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-text); text-decoration: none; font-weight: 600; transition: transform 0.2s var(--ease), filter 0.2s var(--ease), background-color 0.2s var(--ease); }
.btn:hover { transform: translateY(-1px); filter: brightness(0.94); }
.btn.secondary { background: transparent; color: var(--accent); }
.btn.secondary:hover { background: var(--surface); filter: none; }
.btn .icon { width: 1.15rem; height: 1.15rem; }
.meta { font-size: 0.88rem; color: var(--muted); margin: 0.6rem 0 0; }

/* the controller drawing */
.hero-art { display: grid; place-items: center; }
.pad { width: 100%; max-width: 30rem; height: auto; color: var(--text); overflow: visible; }
.pad .body { fill: var(--surface); stroke: currentColor; stroke-width: 3; stroke-linejoin: round; }
.pad .well { fill: var(--bg); stroke: currentColor; stroke-width: 2.5; }
.pad .knob { fill: var(--accent); }
.pad .dpad rect { fill: currentColor; }
.pad .center circle { fill: currentColor; opacity: 0.6; }
.pad .key { fill: var(--bg); stroke: currentColor; stroke-width: 2.5; }
.pad .lt, .pad .rt, .pad .lb, .pad .rb { fill: var(--surface-2); stroke: currentColor; stroke-width: 2.5; }
.pad .knob, .pad .key, .pad .lt, .pad .rt { transform-box: fill-box; transform-origin: center; }

/* sections */
section { padding: 4rem 0; border-top: 1px solid var(--line); }
.intro { color: var(--muted); max-width: 42rem; }

.steps { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.steps li { display: flex; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.3rem; transition: transform 0.25s var(--ease), border-color 0.25s var(--ease); }
.steps li:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.num { flex: none; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--accent); color: var(--accent-text); font: 700 0.95rem var(--sans); }
.steps h3 { margin: 0.1rem 0 0.35rem; }
.steps p { margin: 0; color: var(--muted); font-size: 0.96rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr)); gap: 1rem; margin-top: 1.75rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.3rem 1.35rem 1.4rem; transition: transform 0.25s var(--ease), border-color 0.25s var(--ease); }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.card .icon { color: var(--accent); width: 1.7rem; height: 1.7rem; margin-bottom: 0.8rem; }
.card h3 { margin-bottom: 0.4em; }
.card p { margin: 0; color: var(--muted); font-size: 0.96rem; }

.table-scroll { overflow-x: auto; margin-top: 1.5rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.65rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; background: var(--surface-2); }
tbody tr { transition: background-color 0.2s var(--ease); }
tbody tr:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }

.install-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1rem; margin-top: 1.75rem; }
.install-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.install-card h3 { display: flex; align-items: center; gap: 0.6rem; margin: 0; }
.install-card h3 .icon { color: var(--accent); }
.install-card p { margin: 0; color: var(--muted); font-size: 0.96rem; }
.install-card .btn { align-self: flex-start; margin: 0.3rem 0; }
.install-card .small { font-size: 0.88rem; }
.build { margin-top: 2.25rem; }
.build h3 { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
pre { background: var(--term); color: #e8ece9; padding: 1rem 1.15rem; border-radius: 10px; overflow-x: auto; font-size: 0.86rem; }
pre code { background: none; padding: 0; color: inherit; }

.touches { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.touches li { border-left: 3px solid var(--accent); padding: 0.2rem 0 0.2rem 1.1rem; }
.touches h3 { margin: 0 0 0.3rem; }
.touches p { margin: 0; color: var(--muted); font-size: 0.96rem; }

details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
details:first-of-type { border-top: 1px solid var(--line); margin-top: 1.5rem; }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; width: 0.55rem; height: 0.55rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.25s var(--ease); flex: none; margin-right: 0.25rem; }
details[open] summary::after { transform: rotate(-135deg); }
details p { margin: 0.7rem 0 0; color: var(--muted); animation: fade-down 0.3s var(--ease); }

footer.site { border-top: 1px solid var(--line); padding: 2rem 0 3rem; color: var(--muted); font-size: 0.92rem; }
footer.site ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.3rem; list-style: none; padding: 0; margin: 0 0 1rem; }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--text); }

/* motion */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade-down { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes orbit-a { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(9px, -6px); } 50% { transform: translate(5px, 8px); } 75% { transform: translate(-9px, 3px); } }
@keyframes orbit-b { 0%, 100% { transform: translate(0, 0); } 30% { transform: translate(-8px, 6px); } 60% { transform: translate(7px, 3px); } 80% { transform: translate(2px, -8px); } }
@keyframes press { 0%, 14%, 100% { fill: var(--bg); } 3%, 11% { fill: var(--accent); } }
@keyframes pull { 0%, 60%, 100% { fill: var(--surface-2); } 70%, 85% { fill: var(--accent); } }

@media (prefers-reduced-motion: no-preference) {
  .hero-text > * { animation: rise 0.7s var(--ease) both; }
  .hero-text > :nth-child(2) { animation-delay: 0.06s; }
  .hero-text > :nth-child(3) { animation-delay: 0.12s; }
  .hero-text > :nth-child(4) { animation-delay: 0.18s; }
  .hero-text > :nth-child(5) { animation-delay: 0.24s; }
  .hero-text > :nth-child(6) { animation-delay: 0.3s; }
  .hero-art { animation: rise 0.9s var(--ease) 0.2s both; }
  .pad .ls .knob { animation: orbit-a 7s ease-in-out infinite; }
  .pad .rs .knob { animation: orbit-b 9s ease-in-out infinite; }
  .pad .key { animation: press 6s ease-in-out infinite; }
  .pad .key.y { animation-delay: 0s; } .pad .key.b { animation-delay: 1.5s; } .pad .key.a { animation-delay: 3s; } .pad .key.x { animation-delay: 4.5s; }
  .pad .lt { animation: pull 5s ease-in-out infinite; } .pad .rt { animation: pull 5s ease-in-out 2.5s infinite; }
  @supports (animation-timeline: view()) {
    .card, .steps li, .install-card, .table-scroll, .touches li { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
  }
}

@media (max-width: 880px) {
  .hero { padding: 2.75rem 0 3rem; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  section { padding: 3rem 0; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  nav ul { font-size: 0.88rem; gap: 0.3rem 0.9rem; }
  nav li.hide-small { display: none; }
}
@media (max-width: 440px) {
  nav li:not(:last-child) { display: none; }
}

.note { color: var(--muted); font-size: 0.92rem; max-width: 42rem; margin-top: 1rem; }
