:root {
  color-scheme: light;
  --bg: #f4f3f0;
  --fg: #171614;
  --muted: #5c5852;
  --line: rgba(23, 22, 20, 0.14);
  --wash: rgba(23, 22, 20, 0.05);
  --coral: #ff5a36;
  --coral-ink: #1c1916;
  --shadow: 0 1px 2px rgba(23, 22, 20, 0.06), 0 16px 40px rgba(23, 22, 20, 0.08);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  letter-spacing: -0.011em;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141311;
  --fg: #f3efe8;
  --muted: #b1aaa2;
  --line: rgba(243, 239, 232, 0.14);
  --wash: rgba(243, 239, 232, 0.06);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 40px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
}

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

a { color: inherit; }

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

.skip {
  position: absolute;
  left: 12px;
  top: 12px;
  transform: translateY(-150%);
  background: var(--fg);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 3;
}

.skip:focus { transform: none; }

.bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  min-height: 60px;
  padding: 8px 28px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.word .rocks { color: #c2411f; }

html[data-theme="dark"] .word .rocks { color: #ff8a6a; }

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.bar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.lang { position: relative; }

.lang > button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--wash);
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  font-weight: 650;
}

.lang > button[aria-expanded="true"] .chev { transform: rotate(180deg); }

#lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 5;
  min-width: 200px;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

#lang-menu[hidden] { display: none; }

#lang-menu li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 10px 0 12px;
  border-radius: 8px;
  font-weight: 650;
  cursor: pointer;
}

#lang-menu li:hover,
#lang-menu li:focus-visible {
  background: var(--wash);
  outline: none;
}

#lang-menu [aria-selected="true"] {
  background: color-mix(in srgb, var(--coral) 14%, transparent);
}

#lang-menu .code {
  width: 22px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

#lang-menu .check { margin-left: auto; opacity: 0; }

#lang-menu [aria-selected="true"] .check { opacity: 1; color: #c2411f; }

html[data-theme="dark"] #lang-menu [aria-selected="true"] .check { color: #ff8a6a; }

.theme {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--wash);
}

.theme button {
  display: grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}

.theme button[aria-pressed="true"] {
  background: var(--fg);
  color: var(--bg);
}

.bar-download {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--coral);
  color: var(--coral-ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.intro, .works, .controls, .stage, .pillars, .files, footer {
  width: min(1180px, calc(100% - 56px));
  margin-left: auto;
  margin-right: auto;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 48px;
  align-items: end;
  padding: 48px 0 0;
}

h1, h2 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

h1 { font-size: clamp(48px, 6vw, 68px); }

h1 .rocks { color: #e44622; }

html[data-theme="dark"] h1 .rocks { color: #ff6a45; }

.pitch {
  margin: 8px 0 0;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.lede {
  margin: 14px 0 0;
  font-size: 17px;
  line-height: 1.45;
  color: var(--fg);
}

.gets {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.get {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 52px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  text-decoration: none;
}

.get span {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.get small {
  margin-top: 1px;
  font-size: 13px;
  color: var(--muted);
}

html[data-os="mac"] .get-mac,
html[data-os="windows"] .get-windows,
html[data-os="linux"] .get-linux {
  background: var(--coral);
  border-color: var(--coral);
  color: var(--coral-ink);
}

html[data-os="mac"] .get-mac small,
html[data-os="windows"] .get-windows small,
html[data-os="linux"] .get-linux small {
  color: #1c1916;
}

.get:hover { background: var(--wash); }

html[data-os="mac"] .get-mac:hover,
html[data-os="windows"] .get-windows:hover,
html[data-os="linux"] .get-linux:hover {
  background: #ff6a4a;
}

.meta {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  margin-top: 36px;
}

.tabs {
  display: flex;
  align-items: stretch;
  gap: 4px;
}

.tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  font-weight: 650;
}

.bar svg,
.tabs svg,
.providers svg,
.plate svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tabs svg { width: 16px; height: 16px; flex: none; }

.bar svg { width: 18px; height: 18px; flex: none; }

.lang .chev { width: 16px; height: 16px; }

.tabs button[aria-selected="true"] {
  border-bottom-color: var(--coral);
  color: var(--fg);
}

.line {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.stage {
  min-width: 0;
  margin-top: 12px;
}

.stage img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  box-shadow: var(--shadow);
}

.works { margin-top: 28px; }

.works-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.providers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.providers li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--fg) 3%, transparent);
  font-size: 14px;
  font-weight: 650;
}

.providers svg { width: 18px; height: 18px; }

.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 28px;
  margin-bottom: 8px;
  padding: 0;
  list-style: none;
}

.pillars li {
  margin: 0;
  padding: 16px 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.plate {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--coral) 16%, transparent);
  color: #c2411f;
}

html[data-theme="dark"] .plate { color: #ff8a6a; }

.plate svg { width: 18px; height: 18px; }

.pillars h2 { font-size: 16px; }

.pillars p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.45;
}

[data-lang] { display: none; }

html[lang="en"] [data-lang="en"],
html[lang="de"] [data-lang="de"],
html[lang="fr"] [data-lang="fr"],
html[lang="it"] [data-lang="it"] { display: inline; }

html[lang="en"] .line [data-lang],
html[lang="de"] .line [data-lang],
html[lang="fr"] .line [data-lang],
html[lang="it"] .line [data-lang] { display: none; }

html[lang="en"] .line[data-show="inbox"] [data-feature="inbox"][data-lang="en"],
html[lang="de"] .line[data-show="inbox"] [data-feature="inbox"][data-lang="de"],
html[lang="fr"] .line[data-show="inbox"] [data-feature="inbox"][data-lang="fr"],
html[lang="it"] .line[data-show="inbox"] [data-feature="inbox"][data-lang="it"],
html[lang="en"] .line[data-show="now"] [data-feature="now"][data-lang="en"],
html[lang="de"] .line[data-show="now"] [data-feature="now"][data-lang="de"],
html[lang="fr"] .line[data-show="now"] [data-feature="now"][data-lang="fr"],
html[lang="it"] .line[data-show="now"] [data-feature="now"][data-lang="it"],
html[lang="en"] .line[data-show="reply"] [data-feature="reply"][data-lang="en"],
html[lang="de"] .line[data-show="reply"] [data-feature="reply"][data-lang="de"],
html[lang="fr"] .line[data-show="reply"] [data-feature="reply"][data-lang="fr"],
html[lang="it"] .line[data-show="reply"] [data-feature="reply"][data-lang="it"],
html[lang="en"] .line[data-show="calendar"] [data-feature="calendar"][data-lang="en"],
html[lang="de"] .line[data-show="calendar"] [data-feature="calendar"][data-lang="de"],
html[lang="fr"] .line[data-show="calendar"] [data-feature="calendar"][data-lang="fr"],
html[lang="it"] .line[data-show="calendar"] [data-feature="calendar"][data-lang="it"] { display: inline; }

.files {
  padding-bottom: 12px;
  scroll-margin-top: 72px;
}

.files > h2 {
  font-size: 16px;
  padding-bottom: 8px;
}

.row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.row:last-child { border-bottom: 1px solid var(--line); }

.row strong {
  font-size: 16px;
  font-weight: 700;
}

.row > span {
  color: var(--muted);
  font-size: 14px;
}

.row em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  min-width: 104px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-style: normal;
  font-size: 14px;
  font-weight: 700;
}

.row:hover { background: var(--wash); }

html[data-os="mac"] .row-mac em,
html[data-os="windows"] .row-windows em,
html[data-os="linux"] .row-linux em {
  background: var(--coral);
  border-color: var(--coral);
  color: var(--coral-ink);
}

footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 22px 0 28px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

footer img {
  width: 20px;
  height: 20px;
  border-radius: 5px;
}

footer p { margin: 0; }

@media (max-width: 1080px) {
  .pillars { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .bar { padding: 0 16px; }
  .intro, .works, .controls, .stage, .pillars, .files, footer { width: min(1180px, calc(100% - 32px)); }
  .intro {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-top: 28px;
  }
  .gets { display: grid; }
  .get { min-height: 56px; }
  .controls { margin-top: 24px; }
  .tabs { flex-wrap: wrap; }
  .pillars { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr auto; }
  .row > span { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
