/* esOS website - https://esos.korayustundag.com.tr/
   Copyright (c) 2026 Koray USTUNDAG. All rights reserved.

   Layout: a technical datasheet. A 12-column grid, left-aligned text,
   hairline rules between sections, monospaced values for anything a
   machine reads (versions, hashes, kernel symbols). One deliberately
   light theme; the only dark surface is the console, which is how the
   product itself looks. */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/IBMPlexSans-var.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/IBMPlexMono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/IBMPlexMono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* color */
  --paper: #f5f8f9;          /* page ground, cool with a cyan bias */
  --surface: #ffffff;        /* raised panels, tables */
  --tint: #e8f1f3;           /* quiet fills: notes, table heads */
  --ink: #0c1e27;            /* text */
  --ink-2: #4a5c66;          /* secondary text */
  --ink-3: #6b7c85;          /* captions */
  --rule: #d4dde2;           /* hairlines */
  --accent: #0a6a7e;         /* the esOS prompt cyan, darkened for paper */
  --accent-strong: #07505f;
  --accent-soft: #d3eaee;
  --ok: #1d6f48;             /* "verified" marks */
  --console: #0f1b21;        /* the product's own screen */
  --console-fg: #c7d2d7;
  --console-dim: #7f9099;
  --console-cyan: #56d0de;
  --focus: #e0a400;

  /* type */
  --sans: "IBM Plex Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.3rem + 1.6vw, 2.25rem);
  --step-4: clamp(2.25rem, 1.4rem + 3.4vw, 3.5rem);

  /* layout */
  --wrap: 72rem;
  --gutter: clamp(1rem, 0.5rem + 2vw, 2rem);
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
  --radius: 6px;
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.2; text-wrap: balance; letter-spacing: -0.012em; }
h1 { font-size: var(--step-4); letter-spacing: -0.025em; line-height: 1.08; }
h2 { font-size: var(--step-3); letter-spacing: -0.02em; }
h3 { font-size: var(--step-1); }
p { margin: 0; text-wrap: pretty; }

code, kbd, samp, pre { font-family: var(--mono); font-size: 0.92em; }
:not(pre) > code {
  background: var(--tint);
  border-radius: 3px;
  padding: 0.08em 0.35em;
  overflow-wrap: anywhere;
}
kbd {
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--surface);
  padding: 0.05em 0.4em;
  font-size: 0.85em;
}

.skip {
  position: absolute; left: var(--gutter); top: -4rem;
  background: var(--ink); color: var(--surface); padding: 0.6rem 1rem; z-index: 50;
}
.skip:focus { top: 0.5rem; color: var(--surface); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3); min-height: 4rem; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand-name { font-weight: 600; font-size: 1.2rem; letter-spacing: -0.02em; }
.brand-ver {
  font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3);
  border: 1px solid var(--rule); border-radius: 3px; padding: 0.05rem 0.35rem;
}

.nav { display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; }
.nav a {
  color: var(--ink-2); text-decoration: none; font-size: 0.95rem;
  padding: 0.45rem 0.7rem; border-radius: var(--radius);
}
.nav a:hover { color: var(--ink); background: var(--tint); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 500; box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav .nav-cta { background: var(--ink); color: var(--surface); margin-left: 0.35rem; }
.nav .nav-cta:hover { background: var(--accent-strong); color: var(--surface); }
.nav .nav-cta[aria-current="page"] { box-shadow: none; border-radius: var(--radius); color: var(--surface); }

.menu-btn {
  display: none; font: inherit; font-size: 0.95rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 0.4rem 0.75rem; cursor: pointer;
}
@media (max-width: 52rem) {
  .js .menu-btn { display: inline-flex; }
  .js .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: var(--space-2); }
  .js .nav.open { display: flex; }
  .nav .nav-cta { margin-left: 0; text-align: center; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); }
}

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font: inherit; font-weight: 500; font-size: 1rem; line-height: 1.2;
  padding: 0.8rem 1.2rem; border-radius: var(--radius);
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--surface); }
.btn-primary:hover { background: var(--accent-strong); color: var(--surface); text-decoration: none; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--ink-3); color: var(--ink); }
.btn small { font-family: var(--mono); font-size: 0.75rem; font-weight: 400; opacity: 0.85; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* --------------------------------------------------------------- section */
.section { padding-block: var(--space-6); border-top: 1px solid var(--rule); }
.section:first-of-type { border-top: 0; }
.section-head { display: grid; gap: var(--space-2); max-width: 46rem; margin-bottom: var(--space-4); }
.section-head > p:not(.eyebrow) { color: var(--ink-2); font-size: var(--step-1); }
.eyebrow {
  font-family: var(--mono); font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
}
.lede { font-size: var(--step-1); color: var(--ink-2); max-width: 40rem; }
.prose { max-width: 44rem; display: grid; gap: var(--space-2); }
.prose h2 { margin-top: var(--space-4); }
.prose h3 { margin-top: var(--space-3); }
.prose ul, .prose ol { margin: 0; padding-left: 1.3rem; display: grid; gap: 0.35rem; }
.muted { color: var(--ink-2); }
.small { font-size: var(--step--1); }

/* ------------------------------------------------------------------ hero */
.hero { padding-block: var(--space-5) var(--space-6); }
.hero-grid {
  display: grid; gap: var(--space-5);
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center;
}
.hero-copy { display: grid; gap: var(--space-3); min-width: 0; }
.hero-facts {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0; padding: 0; list-style: none;
  font-family: var(--mono); font-size: 0.82rem; color: var(--ink-2);
}
.hero-facts li { display: inline-flex; align-items: center; gap: 0.45rem; }
.hero-facts li::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: var(--accent); }
@media (max-width: 60rem) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }

.page-hero { padding-block: var(--space-5) var(--space-4); border-bottom: 1px solid var(--rule); }
.page-hero .wrap { display: grid; gap: var(--space-2); }

/* --------------------------------------------------------------- console */
.console {
  background: var(--console); color: var(--console-fg);
  border-radius: 8px; overflow: hidden; min-width: 0; margin: 0;
  box-shadow: 0 1px 0 rgba(12, 30, 39, 0.04), 0 24px 48px -24px rgba(12, 30, 39, 0.45);
}
.console-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.55rem 0.9rem; border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-family: var(--mono); font-size: 0.72rem; color: var(--console-dim); letter-spacing: 0.04em;
}
.console pre {
  margin: 0; padding: 1rem 1.1rem 1.2rem; overflow-x: auto;
  font-size: clamp(0.66rem, 0.5rem + 0.4vw, 0.8rem); line-height: 1.55; color: var(--console-fg);
}
.console .c-dim { color: var(--console-dim); }
.console .c-cyan { color: var(--console-cyan); font-weight: 500; }
.console .c-out { color: #e6edf0; }
.cursor { display: inline-block; width: 0.6em; height: 1.1em; vertical-align: -0.2em; background: var(--console-fg); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ------------------------------------------------------------ properties */
.props { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4) var(--space-3); }
.prop { display: grid; gap: 0.6rem; align-content: start; border-top: 2px solid var(--ink); padding-top: var(--space-2); min-width: 0; }
.prop .k { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); }
.prop p { color: var(--ink-2); }
@media (max-width: 62rem) { .props { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 34rem) { .props { grid-template-columns: minmax(0, 1fr); } }

/* ----------------------------------------------------------------- steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); counter-reset: step; }
.steps > li { counter-increment: step; display: grid; gap: 0.6rem; align-content: start; min-width: 0; }
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono); font-size: 0.8rem; color: var(--ink-3);
  border-bottom: 1px solid var(--rule); padding-bottom: 0.5rem;
}
.steps p { color: var(--ink-2); }
@media (max-width: 62rem) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 34rem) { .steps { grid-template-columns: minmax(0, 1fr); } }

.steps-v { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); counter-reset: step; }
.steps-v > li { counter-increment: step; display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: var(--space-2); }
.steps-v > li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono); font-size: 0.85rem; color: var(--accent); padding-top: 0.2rem;
}
.steps-v > li > div { display: grid; gap: 0.75rem; min-width: 0; }

/* ------------------------------------------------------------- datasheet */
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--space-5); align-items: start; }
@media (max-width: 60rem) { .split { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); } }

.spec { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.spec th, .spec td { text-align: left; vertical-align: top; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
.spec th { font-weight: 400; color: var(--ink-2); width: 42%; padding-right: 1rem; }
.spec td { font-family: var(--mono); font-size: 0.86rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.spec tr:first-child th, .spec tr:first-child td { border-top: 1px solid var(--ink); }

.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th, .table td { text-align: left; vertical-align: top; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--rule); }
.table thead th {
  background: var(--tint); font-family: var(--mono); font-size: 0.74rem; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap;
}
.table tbody tr:last-child td, .table tbody tr:last-child th { border-bottom: 0; }
.table td.mono, .table .mono { font-family: var(--mono); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.table .hash { font-family: var(--mono); font-size: 0.76rem; overflow-wrap: anywhere; color: var(--ink-2); min-width: 18rem; }
.table .nowrap { white-space: nowrap; }
.table a { overflow-wrap: anywhere; }

/* ------------------------------------------------------------ code block */
.code { position: relative; background: var(--console); color: var(--console-fg); border-radius: var(--radius); min-width: 0; }
.code pre { margin: 0; padding: 0.95rem 1rem; padding-right: 4.75rem; overflow-x: auto; font-size: 0.84rem; line-height: 1.6; }
.code .c-dim { color: var(--console-dim); }
.code .c-cyan { color: var(--console-cyan); }
.copy {
  position: absolute; top: 0.5rem; right: 0.5rem;
  font: 500 0.72rem/1 var(--mono); letter-spacing: 0.04em;
  color: var(--console-fg); background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 4px;
  padding: 0.4rem 0.55rem; cursor: pointer;
}
.copy:hover { background: rgba(255, 255, 255, 0.16); }
.copy[data-state="done"] { color: var(--console-cyan); border-color: var(--console-cyan); }

/* ----------------------------------------------------------------- notes */
.note {
  background: var(--tint); border-radius: var(--radius);
  padding: var(--space-2) var(--space-3); display: grid; gap: 0.4rem; min-width: 0;
}
.note .label { font-family: var(--mono); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-strong); }
.note.warn { background: #fbf3dd; }
.note.warn .label { color: #7a5200; }

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.check-list li { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); gap: 0.6rem; }
.check-list li::before {
  content: ""; width: 0.95rem; height: 0.95rem; margin-top: 0.3rem; border-radius: 2px;
  background: var(--ok);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6.2 11.6 2.6 8l1.2-1.2 2.4 2.4 6-6L13.4 4.4z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6.2 11.6 2.6 8l1.2-1.2 2.4 2.4 6-6L13.4 4.4z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.x-list li::before { background: var(--ink-3);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.2 3 8 6.8 11.8 3 13 4.2 9.2 8l3.8 3.8-1.2 1.2L8 9.2 4.2 13 3 11.8 6.8 8 3 4.2z'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.2 3 8 6.8 11.8 3 13 4.2 9.2 8l3.8 3.8-1.2 1.2L8 9.2 4.2 13 3 11.8 6.8 8 3 4.2z'/%3E%3C/svg%3E"); }

/* ------------------------------------------------------------------ tabs */
.tabs { display: grid; gap: var(--space-2); min-width: 0; }
.tablist { display: none; gap: 0.25rem; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.js .tablist { display: flex; }
.tablist button {
  font: inherit; font-size: 0.95rem; color: var(--ink-2); background: none; border: 0;
  padding: 0.6rem 0.9rem; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tablist button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 500; }
.tabpanel { display: grid; gap: 0.75rem; min-width: 0; }
.tabpanel > h3 { font-size: var(--step-0); }
.js .tabpanel > h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- docs */
.doc-layout { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: var(--space-5); padding-block: var(--space-5) var(--space-6); }
.toc { position: sticky; top: 5.5rem; align-self: start; display: grid; gap: 0.25rem; font-size: 0.92rem; }
.toc .eyebrow { margin-bottom: 0.4rem; }
.toc a { color: var(--ink-2); text-decoration: none; padding: 0.25rem 0 0.25rem 0.75rem; border-left: 1px solid var(--rule); }
.toc a:hover { color: var(--ink); border-left-color: var(--accent); }
.doc { display: grid; gap: var(--space-5); min-width: 0; }
.doc section { display: grid; gap: var(--space-2); max-width: 46rem; min-width: 0; }
.doc section h2 { font-size: var(--step-2); }
.doc section > p, .doc section li { color: var(--ink); }
.doc ul, .doc ol { margin: 0; padding-left: 1.3rem; display: grid; gap: 0.35rem; }
@media (max-width: 60rem) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .toc { position: static; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
}

/* --------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--rule); background: var(--surface); padding-block: var(--space-5) var(--space-4); font-size: 0.92rem; color: var(--ink-2); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.footer-grid h2 { font-family: var(--mono); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.75rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.footer-grid a { color: var(--ink-2); text-decoration: none; }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; }
.footer-legal { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--rule); display: grid; gap: 0.35rem; font-size: 0.84rem; color: var(--ink-3); }
@media (max-width: 52rem) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 30rem) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.cta-band h2 { max-width: 34rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
