/* gevrek's page. Colours and typefaces are the brand's own
   (assets/brand/tokens/gevrek.css). */

:root {
  --molasses: #21110A;
  --surface: #2E1A10;
  --raised: #3A2316;
  --crust: #D9701F;
  --crust-deep: #C75F14;
  --ember: #E58A3C;
  --sesame: #F4E2BC;
  --muted: #C4A482;
  --muted-on-light: #5E3D26;
  --line: rgba(244, 226, 188, 0.14);
  --display: "Outfit", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --page: min(1180px, 100% - 2.5rem);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--molasses);
  color: var(--sesame);
  font-family: var(--display);
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

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

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

code, kbd, pre { font-family: var(--mono); font-size: 0.86em; }

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--sesame); color: var(--molasses);
  padding: 0.5rem 0.9rem; border-radius: 8px; z-index: 20;
}
.skip:focus { top: 1rem; }

/* The top */

.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: var(--page); margin: 0 auto;
  padding: 0.9rem 0;
  background: linear-gradient(var(--molasses) 70%, transparent);
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--sesame); text-decoration: none;
  font-size: 1.4rem; font-weight: 500; letter-spacing: -0.01em;
}
.top nav { display: flex; gap: 1.4rem; align-items: center; font-size: 1rem; font-weight: 400; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--sesame); }
.top nav a.out {
  color: var(--sesame);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.9rem;
}
.top nav a.out:hover { border-color: var(--sesame); }

/* The hero */

.hero {
  width: var(--page); margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 6rem);
  display: grid; gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
}
h1 {
  margin: 0 0 1.4rem;
  font-size: clamp(2.8rem, 6.2vw, 5.4rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.lede { margin: 0 0 2rem; max-width: 34ch; font-size: 1.3rem; color: var(--muted); }
.actions { margin: 0; display: flex; flex-wrap: wrap; gap: 0.8rem; }
.button {
  display: inline-block; text-decoration: none;
  background: var(--crust); color: var(--molasses);
  font-weight: 500; padding: 0.75rem 1.4rem; border-radius: 12px;
  border: 1px solid var(--crust);
}
.button:hover { background: var(--ember); border-color: var(--ember); color: var(--molasses); }
.button.quiet { background: transparent; color: var(--sesame); border-color: var(--line); }
.button.quiet:hover { border-color: var(--sesame); background: transparent; color: var(--sesame); }

/* The small gevrek */

.stage {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.6rem;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
}
.panel {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.25rem 0.5rem 0.6rem;
  font-size: 0.8rem; font-weight: 400; color: var(--muted);
}
.panel .space {
  min-width: 1.5rem; text-align: center; border-radius: 999px;
  padding: 0.05rem 0.45rem; background: rgba(244, 226, 188, 0.07);
}
.panel .space.on { background: var(--crust); color: var(--molasses); font-weight: 500; }
.panel .layout-name { margin-left: 0.4rem; color: var(--sesame); }
.panel .clock { margin-left: auto; font-variant-numeric: tabular-nums; }

.display {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(217, 112, 31, 0.28), transparent 60%),
    radial-gradient(90% 80% at 0% 100%, rgba(244, 226, 188, 0.10), transparent 60%),
    #170B06;
}
.win {
  position: absolute;
  border-radius: 10px;
  border: 2px solid rgba(244, 226, 188, 0.16);
  background: #2A1810;
  color: var(--muted);
  padding: 0.7rem 0.8rem;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  font: inherit;
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
  transition:
    left 420ms cubic-bezier(0.2, 0.8, 0.2, 1),
    top 420ms cubic-bezier(0.2, 0.8, 0.2, 1),
    width 420ms cubic-bezier(0.2, 0.8, 0.2, 1),
    height 420ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 240ms ease, border-color 160ms ease;
}
.win.focused { border-color: var(--sesame); color: var(--sesame); z-index: 3; }
.win.hidden { opacity: 0; pointer-events: none; }
.win.coming { opacity: 0; }
.win .title { display: block; font-size: 0.95rem; font-weight: 500; white-space: nowrap; }
.win .says { display: block; font-size: 0.74rem; color: var(--muted); white-space: nowrap; margin-bottom: 0.6rem; }
.win i {
  display: block; height: 5px; border-radius: 3px; margin-top: 7px;
  background: var(--tint); opacity: 0.32;
}
.win i:nth-of-type(4n + 1) { opacity: 0.7; }

.keys { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; padding: 0.7rem 0.3rem 0.3rem; }
.keys button {
  font: inherit; font-size: 0.9rem; font-weight: 400;
  color: var(--sesame); background: rgba(244, 226, 188, 0.06);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 0.35rem 0.75rem 0.35rem 0.4rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.keys button:hover { border-color: var(--sesame); }
.keys button:disabled { opacity: 0.4; cursor: default; border-color: var(--line); }
kbd {
  display: inline-block; min-width: 1.6rem; text-align: center;
  background: var(--molasses); color: var(--sesame);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px;
  padding: 0.05rem 0.35rem;
}
.keys .hint { font-size: 0.85rem; color: var(--muted); flex-basis: 100%; padding-left: 0.2rem; }

/* Sections */

section.plain, section.light { padding: clamp(3.5rem, 8vw, 7rem) 0; }
section.plain > *, section.light > * { width: var(--page); margin-left: auto; margin-right: auto; }
section.plain + section.plain { border-top: 1px solid var(--line); }

.split {
  display: grid; gap: 1rem clamp(2rem, 5vw, 5rem);
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: start;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
h2 {
  margin: 0;
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  font-weight: 500; line-height: 1.05; letter-spacing: -0.025em;
  text-wrap: balance;
}
h3 { margin: 0 0 0.5rem; font-size: 1.25rem; font-weight: 500; letter-spacing: -0.01em; }
.prose p { margin: 0 0 1rem; max-width: 60ch; color: var(--muted); }
.prose p:last-child { margin-bottom: 0; }

figure { margin: 0; }
figure img { border-radius: 12px; border: 1px solid var(--line); }
figcaption { margin-top: 0.8rem; font-size: 1rem; color: var(--muted); max-width: 44ch; }
figcaption b { color: var(--sesame); font-weight: 500; }
figcaption code { color: var(--sesame); }

/* The shell's pictures: laid as gevrek would lay four windows. */
.shell-grid {
  display: grid; gap: 2.2rem 1.6rem;
  grid-template-columns: minmax(0, 6.4fr) minmax(0, 3.8fr) minmax(0, 4fr);
  grid-template-areas:
    "launcher control notes"
    "overview control notes";
  align-items: start;
}
.f-launcher { grid-area: launcher; }
.f-control { grid-area: control; }
.f-notes { grid-area: notes; }
.f-overview { grid-area: overview; }
.aside { margin-top: 2.5rem; color: var(--muted); }
.aside span { display: block; max-width: 70ch; }

/* The studio, on sesame */
section.light { background: var(--sesame); color: var(--molasses); }
section.light .prose p, section.light .three p { color: var(--muted-on-light); }
section.light a { color: var(--crust-deep); }
section.light figure img { border-color: rgba(33, 17, 10, 0.25); box-shadow: 0 30px 70px -35px rgba(33, 17, 10, 0.55); }
.wide { margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.wide:last-child { margin-bottom: 0; }
.three {
  display: grid; gap: 2rem clamp(1.5rem, 3vw, 3rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.three p { margin: 0; font-size: 1.05rem; }

/* Learning */
.learn-grid {
  display: grid; gap: 2rem;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: end;
}

/* Systems */
.systems { margin-top: 0; margin-bottom: 0; display: grid; gap: 0; }
.systems > div {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 0.4rem clamp(2rem, 5vw, 5rem);
  padding: 1.4rem 0; border-top: 1px solid var(--line);
}
.systems dt { font-size: 1.5rem; font-weight: 500; letter-spacing: -0.015em; }
.systems dd { margin: 0; color: var(--muted); max-width: 60ch; }

/* Programs */
.programs { list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; }
.programs li { border-top: 1px solid var(--line); }
.programs li:last-child { border-bottom: 1px solid var(--line); }
.programs a {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 0.3rem clamp(2rem, 5vw, 5rem);
  align-items: baseline;
  padding: 1.3rem 0; text-decoration: none; color: inherit;
}
.programs .name {
  font-size: clamp(1.9rem, 3.4vw, 2.8rem); font-weight: 500; letter-spacing: -0.025em; line-height: 1.1;
  color: var(--sesame); transition: color 120ms ease;
}
.programs .what { color: var(--muted); max-width: 60ch; }
.programs a:hover .name, .programs a:focus-visible .name { color: var(--ember); }

/* Building */
.code-pair { display: grid; gap: 2rem; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
pre {
  margin: 0; padding: 1.1rem 1.2rem; overflow-x: auto;
  background: #170B06; border: 1px solid var(--line); border-radius: 12px;
  color: var(--sesame); line-height: 1.6;
}
.prose code, .note code { color: var(--sesame); }
.note { margin: 0.9rem 0 0; font-size: 1rem; color: var(--muted); }

/* The foot */
.foot {
  border-top: 1px solid var(--line);
  width: var(--page); margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) 0 4rem;
  display: grid; gap: 2rem clamp(2rem, 5vw, 5rem);
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
}
.foot h2 { font-size: 1.6rem; margin-bottom: 0.8rem; }
.foot p { margin: 0 0 0.9rem; color: var(--muted); max-width: 58ch; }
.made img { margin-bottom: 1rem; }
.made p:first-of-type { color: var(--sesame); font-size: 1.3rem; font-weight: 400; line-height: 1.3; }
.small { font-size: 0.98rem; }

/* Narrow */
@media (max-width: 900px) {
  .hero, .split, .learn-grid, .code-pair, .foot { grid-template-columns: minmax(0, 1fr); }
  .systems > div, .programs a { grid-template-columns: minmax(0, 1fr); }
  .three { grid-template-columns: minmax(0, 1fr); }
  .shell-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "launcher launcher" "control notes" "overview overview";
  }
  .top nav a:not(.out) { display: none; }
  .lede { max-width: 46ch; }
}
@media (max-width: 520px) {
  body { font-size: 1.05rem; }
  .keys button { font-size: 0.82rem; }
  .win .says, .win i:nth-of-type(n + 4) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .win, .programs .name { transition: none; }
}
