/* tanGO website: colors sampled from the logo (navy #013B8A, cyan #01AADE). */

/* Self-hosted Latin subsets of Plus Jakarta Sans and JetBrains Mono (both SIL OFL),
   so a page needs no request to Google Fonts. */
@font-face {
  font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  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: "Plus Jakarta Sans"; font-style: italic; font-weight: 800; font-display: swap;
  src: url("fonts/plus-jakarta-sans-italic-latin.woff2") format("woff2");
  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: "JetBrains Mono"; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url("fonts/jetbrains-mono-latin.woff2") format("woff2");
  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;
}

:root {
  color-scheme: light;
  --navy: #013b8a;
  --navy-deep: #022a63;
  --cyan: #01aade;
  --sky: #81dff5;

  --bg: #f7f9fc;
  --surface: #ffffff;
  --tint: #e8f6fc;
  --ink: #0b1f3f;
  --muted: #4a5d7a;
  --line: #d9e3ef;
  --heading: var(--navy);
  --accent: var(--cyan);
  /* Code surfaces: Catppuccin Latte (light) / Mocha (dark). */
  --code-bg: #eff1f5;
  --code-bar: #e6e9ef;
  --code-line: #ccd0da;
  --code-ink: #4c4f69;
  --code-muted: #8c8fa1;
  --code-red: #d20f39;
  --code-yellow: #df8e1d;
  --code-green: #40a02b;

  --radius: 18px;
  --wrap: 1160px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* Dark theme: follows the OS unless the toggle picked one (data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #050f22;
    --surface: #0a1a36;
    --tint: #0b2247;
    --ink: #e3ecf8;
    --muted: #9fb2cc;
    --line: #1a3158;
    --heading: #ffffff;
    --code-bg: #1e1e2e;
    --code-bar: #181825;
    --code-line: #313244;
    --code-ink: #cdd6f4;
    --code-muted: #7f849c;
    --code-red: #f38ba8;
    --code-yellow: #f9e2af;
    --code-green: #a6e3a1;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #050f22;
  --surface: #0a1a36;
  --tint: #0b2247;
  --ink: #e3ecf8;
  --muted: #9fb2cc;
  --line: #1a3158;
  --heading: #ffffff;
  --code-bg: #1e1e2e;
  --code-bar: #181825;
  --code-line: #313244;
  --code-ink: #cdd6f4;
  --code-muted: #7f849c;
  --code-red: #f38ba8;
  --code-yellow: #f9e2af;
  --code-green: #a6e3a1;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
code { font-family: var(--mono); font-size: 0.9em; }
p code, li code, dd code, h2 code {
  background: var(--tint);
  color: var(--heading);
  padding: 0.1em 0.35em;
  border-radius: 6px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip:focus { left: 8px; }

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

h1, h2, h3 { color: var(--heading); line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; }

section { padding: clamp(64px, 9vw, 112px) 0; }

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
}
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head p:not(.eyebrow) { color: var(--muted); font-size: 1.08rem; margin: 16px 0 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn--primary { background: var(--navy); color: #fff; box-shadow: 0 8px 24px -10px var(--navy); }
.btn--primary:hover { background: var(--cyan); transform: translateY(-1px); }
.btn--ghost { border: 2px solid currentColor; color: var(--heading); }
.btn--ghost:hover { background: var(--heading); color: var(--bg); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.nav__brand img { width: 112px; }
.nav__links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  display: block; padding: 8px 14px; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 0.95rem; color: var(--muted);
}
.nav__links a:hover { color: var(--heading); background: var(--tint); }
.nav__links .nav__gh { color: var(--heading); border: 1.5px solid var(--line); }
.nav__version { margin: 0 8px 0 0; font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.nav__version a { color: var(--muted); text-decoration: none; }
.nav__version > a { font-weight: 600; color: var(--heading); }
.nav__version a:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .nav__links li:not(:last-child):not(:nth-last-child(2)) { display: none; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav__brand img { content: url("https://assets.tangoframework.com/assets/tango-logo-light.png"); }
}
:root[data-theme="dark"] .nav__brand img { content: url("https://assets.tangoframework.com/assets/tango-logo-light.png"); }

/* Theme toggle: shows the icon of the theme you'd switch to. */
.nav__end { display: flex; align-items: center; gap: 4px; }
.theme-toggle {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border: 1.5px solid var(--line); border-radius: 50%;
  background: transparent; color: var(--heading); cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover { background: var(--tint); border-color: var(--cyan); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Hero */
.hero { padding-top: clamp(40px, 6vw, 72px); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.25fr 0.75fr; align-items: center; gap: 40px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 24px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--tint); color: var(--heading);
  font-size: 0.85rem; font-weight: 600;
}
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cyan) 25%, transparent); }
h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
}
h1 em { font-style: italic; color: var(--cyan); }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 560px; margin: 24px 0 36px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.install {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 48px; padding: 0 6px 0 18px; border-radius: 999px;
  background: var(--surface); border: 1.5px solid var(--line);
  max-width: 100%;
}
.install code { font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.install .prompt { color: var(--cyan); user-select: none; }
.install__btn {
  font: 600 0.8rem var(--font); color: var(--heading);
  background: var(--tint); border: 0; border-radius: 999px;
  padding: 8px 14px; cursor: pointer;
}
.install__btn:hover { background: var(--cyan); color: #fff; }

.hero__art { position: relative; justify-self: center; width: min(100%, 440px); }
.hero__art img { position: relative; filter: drop-shadow(0 30px 40px rgba(1, 59, 138, 0.22)); animation: sway 6s ease-in-out infinite; transform-origin: 50% 100%; }
.hero__halo {
  position: absolute; inset: 8% -6% 4%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--sky) 55%, transparent), transparent 68%);
}
@keyframes sway { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } }
@media (prefers-reduced-motion: reduce) { .hero__art img { animation: none; } }

@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { order: -1; width: min(70%, 300px); }
}

/* Code */
.code-section { background: var(--navy-deep); color: #e3ecf8; }
.code-section h2 { color: #fff; }
.code-section .section-head p:not(.eyebrow) { color: #b8c9e3; }
.code-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 880px) { .code-grid { grid-template-columns: 1fr; } }
.window {
  margin: 0; background: var(--code-bg); border-radius: var(--radius);
  border: 1px solid var(--code-line); overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}
.window__bar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; font: 500 0.78rem var(--mono); color: var(--code-muted);
  background: var(--code-bar); border-bottom: 1px solid var(--code-line);
}
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--code-line); }
.dots i:first-child { background: var(--code-red); }
.dots i:nth-child(2) { background: var(--code-yellow); }
.dots i:nth-child(3) { background: var(--code-green); }
.window pre { margin: 0; padding: 20px 22px; overflow-x: auto; tab-size: 4; font-size: 0.86rem; line-height: 1.7; }
.window code { font-size: inherit; }

/* Features */
.features {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.features li { background: var(--surface); padding: 28px; transition: background 0.2s ease; }
.features li:hover { background: var(--tint); }
.features h3::before {
  content: ""; display: block; width: 28px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--navy), var(--cyan)); margin-bottom: 18px;
}
.features h3 a { color: inherit; text-decoration: none; }
.features h3 a:hover, .features h3 a:focus-visible { text-decoration: underline; }
.doors { grid-template-columns: repeat(3, 1fr); }
.features p { margin: 10px 0 0; color: var(--muted); font-size: 0.97rem; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .features { grid-template-columns: 1fr; } .features li { padding: 24px 20px; } }

/* Philosophy */
.philosophy { background: var(--tint); }
.philosophy__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 880px) { .philosophy__grid { grid-template-columns: 1fr; gap: 36px; } }
blockquote { margin: 0; }
blockquote p {
  margin: 0; color: var(--heading);
  font-size: clamp(1.8rem, 3.8vw, 3rem); font-weight: 800; font-style: italic;
  line-height: 1.12; letter-spacing: -0.03em;
}
blockquote p::before { content: "“"; color: var(--cyan); }
blockquote p::after { content: "”"; color: var(--cyan); }
cite { display: block; margin-top: 20px; font-style: normal; color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.principles { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.principles li {
  position: relative; padding: 14px 18px 14px 46px;
  background: var(--surface); border-radius: 14px; font-weight: 500;
}
.principles li::before {
  content: ""; position: absolute; left: 18px; top: 50%; translate: 0 -50%;
  width: 12px; height: 12px; border-radius: 50%;
  border: 3px solid var(--cyan);
}

/* CLI + examples */
.split { padding-top: 0; }
.split__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
@media (max-width: 880px) { .split__grid { grid-template-columns: 1fr; } }
.split h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 28px; }
.cli { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.cli li { padding: 12px 0; border-bottom: 1px solid var(--line); font: 500 0.88rem var(--mono); }
.cli a { color: var(--heading); }
.examples { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.examples a {
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px 48px 16px 20px; border-radius: 14px; position: relative;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.examples a::after {
  content: "→"; position: absolute; right: 20px; top: 50%; translate: 0 -50%;
  color: var(--cyan); font-weight: 700; transition: right 0.15s ease;
}
.examples a:hover { border-color: var(--cyan); }
.examples a:hover::after { right: 14px; }
.examples strong { font: 500 0.95rem var(--mono); color: var(--heading); }
.examples span { color: var(--muted); font-size: 0.93rem; }

/* Status */
.status { padding-top: 0; }
.status__card {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding: 36px clamp(20px, 4vw, 40px);
  border: 2px dashed var(--line); border-radius: var(--radius);
}
.status h2 { font-size: 1.5rem; }
.status p, .status li { margin: 10px 0 0; color: var(--muted); max-width: 720px; }
.status ul { margin: 14px 0 0; padding-left: 1.2em; }
.status li strong { color: var(--heading); }
@media (max-width: 760px) { .status__card { flex-direction: column; align-items: flex-start; } }

/* Footer */
.footer { background: var(--navy-deep); color: #b8c9e3; padding: 48px 0; }
.footer__grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer__brand { display: flex; align-items: center; gap: 18px; }
.footer__brand img { width: 96px; }
.footer__brand p { margin: 0; font-size: 0.95rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer a { text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.footer a:hover { color: var(--sky); }
.footer__legal { margin: 0; font-size: 0.85rem; opacity: 0.7; width: 100%; }

/* Let grid/flex children shrink so code blocks scroll instead of widening the page. */
.hero__grid > *, .code-grid > *, .split__grid > *, .philosophy__grid > * { min-width: 0; }
