/* ExitCall — exitcall.app
   Brand v2 — Linear × Things × brass blend, system-following theme.
   Aligned with gulden.studio brand spec. */

:root {
  --bg: #F5F1EA;
  --surface-1: #FBF8F2;
  --surface-2: #FAF6EC;
  --surface-3: #EEE8DC;
  --fg-1: #0A0A0A;
  --fg-2: #5C5852;
  --fg-3: #8A857E;
  --accent: #B8956A;
  --accent-2: #9C7B52;
  --line: #E5DECF;
  --line-strong: #CFC6B2;
  --shadow-card: 0 1px 2px rgba(20,15,5,0.04), 0 8px 24px -8px rgba(20,15,5,0.10);
  --shadow-hover: 0 2px 4px rgba(20,15,5,0.06), 0 16px 32px -12px rgba(20,15,5,0.16);
  --shadow-icon: 0 4px 12px -2px rgba(20,15,5,0.18), 0 20px 40px -16px rgba(184,149,106,0.24);
  --halo: radial-gradient(60% 50% at 50% 0%, rgba(184,149,106,0.18), transparent 70%);
  --max-width: 64rem;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #08090A;
    --surface-1: #131211;
    --surface-2: #1A1917;
    --surface-3: #1C1D1F;
    --fg-1: #F5F1EA;
    --fg-2: #A8A39B;
    --fg-3: #6B6660;
    --accent: #C9A47A;
    --accent-2: #B8956A;
    --line: #24221F;
    --line-strong: #3A3531;
    --shadow-card: 0 1px 2px rgba(0,0,0,0.4), 0 8px 24px -8px rgba(0,0,0,0.5);
    --shadow-hover: 0 2px 4px rgba(0,0,0,0.5), 0 16px 32px -12px rgba(0,0,0,0.6);
    --shadow-icon: 0 4px 12px -2px rgba(0,0,0,0.6), 0 20px 40px -12px rgba(201,164,122,0.30);
    --halo: radial-gradient(60% 50% at 50% 0%, rgba(201,164,122,0.18), transparent 70%);
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--fg-1);
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg-1);
  line-height: 1.6;
  transition: background 0.25s, color 0.25s;
}

::selection { background: var(--accent); color: var(--bg); }

a { color: var(--fg-1); text-decoration: none; }

/* — Container — */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* — Eyebrow (mono caps brass label) — */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
}
.eyebrow.muted { color: var(--fg-3); }
.eyebrow.muted .dot { background: var(--fg-3); }

/* — Header / Nav — */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg-1);
}
.site-logo img { width: 28px; height: 28px; border-radius: 6px; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
}
.site-nav a { color: var(--fg-2); transition: color 0.15s; }
.site-nav a:hover { color: var(--fg-1); }

/* — Hero — */
.hero {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -2rem 0 auto 0;
  height: 28rem;
  background: var(--halo);
  pointer-events: none;
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }

.hero-eyebrow {
  margin: 0 auto 2rem;
  justify-content: center;
}

.hero-icon {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 22px;
  margin: 0 auto 2.5rem;
  box-shadow: var(--shadow-icon);
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.045em;
  max-width: 18ch;
  margin: 0 auto 1.5rem;
}
.hero h1 .muted { color: var(--fg-2); font-weight: 600; }

.hero .subtitle {
  font-size: clamp(1rem, 1.5vw, 1.1875rem);
  color: var(--fg-2);
  max-width: 36rem;
  margin: 0 auto 2.5rem;
  line-height: 1.55;
}

.hero-cta {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.app-store-badge {
  display: inline-block;
  transition: opacity 0.15s, transform 0.15s;
}
.app-store-badge:hover { opacity: 0.92; transform: translateY(-1px); }
.app-store-badge img { display: block; height: 48px; width: auto; }

/* — Section — */
section.section {
  border-top: 1px solid var(--line);
}
section.section .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.section-eyebrow {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.section-title {
  text-align: center;
  font-size: clamp(1.875rem, 3.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 0 auto 3rem;
  max-width: 28ch;
}
.section-title .muted { color: var(--fg-2); }

/* — Features (soft-shadow rounded cards) — */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--line-strong);
}
.feature-num {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--fg-1);
}
.feature-card p {
  font-size: 0.9375rem;
  color: var(--fg-2);
  line-height: 1.6;
}

/* — Steps (minimal 3-up, no card chrome) — */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem 2rem;
  max-width: 60rem;
  margin: 0 auto;
}
.step {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.step-num {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.step h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.step p {
  font-size: 0.9375rem;
  color: var(--fg-2);
  line-height: 1.6;
}

/* — CTA band (warm surface elevation) — */
.cta-section {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.cta-section .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
  text-align: center;
}
.cta-section h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.035em;
  max-width: 24ch;
  margin: 0 auto;
}
.cta-section p {
  margin: 0.75rem auto 0;
  font-size: 1rem;
  color: var(--fg-2);
  max-width: 36rem;
}
.cta-section .app-store-badge { margin-top: 2rem; }

/* — Footer — */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg-2);
  font-size: 0.875rem;
}
.site-footer .container {
  padding-top: 3rem;
  padding-bottom: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.footer-links a {
  color: var(--fg-2);
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.footer-links a:hover { color: var(--fg-1); border-bottom-color: var(--accent); }

.footer-copyright {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.footer-studio {
  font-size: 0.8125rem;
  color: var(--fg-2);
}
.footer-studio a {
  color: var(--fg-1);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}
.footer-studio a:hover { border-bottom-color: var(--accent); }
.footer-studio-dot { color: var(--accent); }

/* — Legal / Content pages — */
.page-content {
  max-width: 40rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
}
.page-content h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}
.page-content .meta {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 2.5rem;
}
.page-content h2 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-top: 2.25rem;
  margin-bottom: 0.5rem;
}
.page-content p, .page-content li {
  color: var(--fg-2);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}
.page-content ul { padding-left: 1.25rem; }
.page-content a {
  color: var(--fg-1);
  border-bottom: 1px solid var(--line);
  transition: border-color 0.15s;
}
.page-content a:hover { border-bottom-color: var(--accent); }

/* — Language Switcher — */
select.lang-switch {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3125rem 0.625rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
select.lang-switch:hover { color: var(--fg-1); border-color: var(--line-strong); }

.lang-switch-wrap { position: relative; display: inline-block; }
.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3125rem 0.625rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.lang-switch-btn:hover { color: var(--fg-1); border-color: var(--line-strong); }
.lang-switch-btn svg { flex-shrink: 0; opacity: 0.6; }

.lang-switch-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 12px;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  min-width: 140px;
  z-index: 100;
  box-shadow: var(--shadow-card);
  max-height: 280px;
  overflow-y: auto;
}
.lang-switch-menu.open { display: block; }
.lang-switch-menu li a {
  display: block;
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  color: var(--fg-2);
}
.lang-switch-menu li a:hover,
.lang-switch-menu li a.active {
  color: var(--fg-1);
  background: var(--surface-2);
}

/* — RTL Support — */
html[dir="rtl"] { direction: rtl; text-align: right; }
html[dir="rtl"] .site-header .container { flex-direction: row-reverse; }
html[dir="rtl"] .site-nav { flex-direction: row-reverse; }
html[dir="rtl"] .footer-links { flex-direction: row-reverse; }
html[dir="rtl"] .site-logo { flex-direction: row-reverse; }
html[dir="rtl"] .feature-card { text-align: right; }
html[dir="rtl"] .page-content ul { padding-left: 0; padding-right: 1.25rem; }

/* — From-app mode — */
body.from-app .lang-switch,
body.from-app .lang-switch-wrap { display: none; }
body.from-app .app-store-badge { display: none; }

/* — Responsive — */
@media (max-width: 640px) {
  .hero { padding: 2.5rem 1.25rem 4rem; }
  section.section .inner { padding: 3.5rem 1.25rem; }
  .cta-section .inner { padding: 3rem 1.25rem 3.5rem; }
  .site-header .container {
    flex-wrap: wrap;
    height: auto;
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
    gap: 0.5rem;
  }
  .site-nav {
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
  }
  .page-content { padding: 2.5rem 1.25rem 4rem; }
  .features-grid { grid-template-columns: 1fr; }
}
