/* ==========================================================================
   Claude Email — Landing site
   Shared stylesheet for English (LTR) and Persian (RTL) pages.
   Palette mirrors app/src/main/java/com/cocode/claudeemailapp/ui/theme/Color.kt
   ========================================================================== */

:root {
  /* Palette — from Color.kt (do not add new colours) */
  --pitch-black:     #050506;
  --carbon:          #0D0E11;
  --graphite:        #14161A;
  --graphite-soft:   #1B1E24;
  --border-strong:   #40444C;
  --border-soft:     #2A2E35;
  --snow:            #F6F7F9;
  --snow-muted:      #AEB4BE;
  --signal-amber:    #F0B35A;
  --signal-blue:     #8AB4F8;
  --signal-green:    #81C995;
  --signal-red:      #F28B82;

  /* Type */
  --mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans:  "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* Rhythm */
  --container: 1180px;
  --gutter-lg: 80px;
  --gutter-md: 48px;
  --radius: 2px;
}

/* Reset ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--pitch-black);
  color: var(--snow);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "ss01", "ss02", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* Ambient background — a single, calm radial glow, amber-tinged */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 600px at 82% -10%, rgba(240, 179, 90, 0.08), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(138, 180, 248, 0.035), transparent 70%);
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

/* Focus states — 2px SignalAmber ------------------------------------------ */
:focus-visible {
  outline: 2px solid var(--signal-amber);
  outline-offset: 2px;
  border-radius: var(--radius);
}

/* Selection */
::selection { background: var(--signal-amber); color: var(--pitch-black); }

/* Container --------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

/* Header / Nav ------------------------------------------------------------ */
.site-header {
  padding: 24px 0;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(5, 5, 6, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--snow);
}
.brand-mark {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  background: var(--graphite);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--signal-amber);
}
.brand-mark svg { width: 14px; height: 14px; }
.brand-name { color: var(--snow); }
.brand-slash { color: var(--snow-muted); }
.brand-suffix { color: var(--signal-amber); }

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.lang-switch {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--snow-muted);
  padding: 8px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  transition: color .15s, border-color .15s, background-color .15s;
}
.lang-switch:hover { color: var(--snow); border-color: var(--border-strong); background: var(--graphite); }

/* Buttons ----------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.04em;
  line-height: 1;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--signal-amber);
  color: var(--pitch-black);
  border-color: var(--signal-amber);
}
.btn-primary:hover { background: #FFC672; border-color: #FFC672; }
.btn-primary .arrow { color: var(--pitch-black); }
.btn-secondary {
  background: transparent;
  color: var(--snow);
  border-color: var(--border-strong);
}
.btn-secondary:hover { border-color: var(--snow); background: var(--graphite); }
.btn-ghost {
  background: transparent;
  color: var(--snow-muted);
  border: 1px solid var(--border-soft);
  padding: 10px 14px;
  font-size: 12px;
}
.btn-ghost:hover { color: var(--snow); border-color: var(--border-strong); }

/* Eyebrow label ----------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal-amber);
}
.eyebrow::before {
  content: "→";
  color: var(--signal-amber);
  opacity: 0.7;
}
[dir="rtl"] .eyebrow::before { content: "←"; }

/* Hero -------------------------------------------------------------------- */
.hero {
  padding: var(--gutter-lg) 0 calc(var(--gutter-lg) + 16px);
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-copy { max-width: 620px; }
.hero-eyebrow { margin-bottom: 28px; }
.hero-title {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(32px, 5.6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  color: var(--snow);
}
.hero-title .accent { color: var(--signal-amber); }
.hero-sub {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--snow-muted);
  margin: 0 0 36px;
  max-width: 52ch;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--snow-muted);
  letter-spacing: 0.04em;
}
.hero-meta span::before {
  content: "·";
  margin-inline-end: 10px;
  color: var(--border-strong);
}
.hero-meta span:first-child::before { content: none; }

/* Hero ornament — terminal panel with conversation preview --------------- */
.hero-visual {
  position: relative;
  isolation: isolate;
}
.terminal {
  background: var(--carbon);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.02) inset,
    0 40px 80px -40px rgba(0, 0, 0, 0.6);
  font-family: var(--mono);
  font-size: 13px;
}
.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--graphite);
}
.terminal-dots {
  display: inline-flex;
  gap: 6px;
}
.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}
.terminal-dot.is-amber { background: var(--signal-amber); }
.terminal-title {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--snow-muted);
}
.terminal-body {
  padding: 20px 18px;
  display: grid;
  gap: 14px;
}
.prompt-line {
  color: var(--snow-muted);
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.prompt-line .p-sym { color: var(--signal-amber); }
.prompt-line .p-cmd { color: var(--snow); }
.cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--signal-amber);
  margin-inline-start: 2px;
  transform: translateY(2px);
  animation: blink 1.1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.thread-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 14px 14px;
  background: var(--graphite);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  transition: border-color .2s;
}
.thread-card:hover { border-color: var(--border-strong); }
.thread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal-amber);
  margin-top: 6px;
  box-shadow: 0 0 0 3px rgba(240, 179, 90, 0.12);
}
.thread-dot.is-muted { background: var(--border-strong); box-shadow: none; }
.thread-title {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--snow);
  margin: 0 0 4px;
  line-height: 1.3;
}
.thread-meta {
  font-size: 11px;
  color: var(--snow-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal-amber);
}
.badge.is-green { color: var(--signal-green); }
.thread-time {
  font-size: 11px;
  color: var(--snow-muted);
  white-space: nowrap;
}

/* Section scaffolding ---------------------------------------------------- */
.section { padding: var(--gutter-lg) 0; }
.section-head { margin-bottom: 56px; max-width: 720px; }
.section-eyebrow { margin-bottom: 16px; }
.section-title {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
  color: var(--snow);
}
.section-lede {
  font-size: 17px;
  color: var(--snow-muted);
  margin: 0;
  max-width: 56ch;
  line-height: 1.6;
}

/* Features grid ----------------------------------------------------------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.feature {
  background: var(--graphite);
  border: 1px solid var(--border-soft);
  border-top-left-radius: 1px;
  border-top-right-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  border-bottom-left-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color .2s, background-color .2s;
  position: relative;
}
.feature::before {
  /* subtle code-block corner accent */
  content: "";
  position: absolute;
  top: -1px;
  inset-inline-start: -1px;
  width: 28px;
  height: 1px;
  background: var(--signal-amber);
  opacity: 0.6;
}
.feature:hover { border-color: var(--border-strong); background: var(--graphite-soft); }
.feature-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal-amber);
  margin-bottom: 16px;
  display: block;
}
.feature-title {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--snow);
  margin: 0 0 10px;
  letter-spacing: -0.005em;
}
.feature-desc {
  font-size: 15px;
  color: var(--snow-muted);
  line-height: 1.55;
  margin: 0;
}

/* Architecture strip ----------------------------------------------------- */
.arch {
  padding: 40px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  text-align: center;
}
.arch-list {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--snow-muted);
  letter-spacing: 0.04em;
  margin: 0;
  padding: 0;
  list-style: none;
}
.arch-list li { position: relative; padding-inline-start: 22px; }
.arch-list li:first-child { padding-inline-start: 0; }
.arch-list li:not(:first-child)::before {
  content: "·";
  position: absolute;
  inset-inline-start: 6px;
  color: var(--border-strong);
}

/* Install ----------------------------------------------------------------- */
.install-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  counter-reset: step;
}
.step {
  padding: 28px 24px;
  background: var(--carbon);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  position: relative;
}
.step-number {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--signal-amber);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  display: block;
}
.step-title {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 500;
  color: var(--snow);
  margin: 0 0 10px;
  line-height: 1.3;
}
.step-body {
  font-size: 15px;
  color: var(--snow-muted);
  line-height: 1.55;
  margin: 0;
}

.install-cta {
  margin-top: 48px;
  padding: 32px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(240, 179, 90, 0.04), transparent 70%),
    var(--carbon);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}
.install-cta-text {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--snow-muted);
  letter-spacing: 0.02em;
  margin: 0;
}
.install-cta-text strong { color: var(--snow); font-weight: 500; }

/* Footer ------------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 40px 0 48px;
  margin-top: 40px;
}
.site-footer p {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--snow-muted);
  letter-spacing: 0.04em;
  margin: 0;
  text-align: center;
}
.site-footer a {
  color: var(--snow);
  border-bottom: 1px solid var(--border-soft);
  transition: color .15s, border-color .15s;
}
.site-footer a:hover { color: var(--signal-amber); border-bottom-color: var(--signal-amber); }

/* Reveal animation (light, intentional) ----------------------------------
   Content is always present — animation only softens the entrance. */
.reveal {
  animation: rise .7s ease-out both;
}
.reveal.d1 { animation-delay: .05s; }
.reveal.d2 { animation-delay: .15s; }
.reveal.d3 { animation-delay: .25s; }
.reveal.d4 { animation-delay: .35s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1040px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { max-width: 520px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .install-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  :root { --gutter-lg: 56px; }
  .section { padding: 56px 0; }
  .features { grid-template-columns: 1fr; }
  .install-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 0; }
  .install-cta { flex-direction: column; align-items: flex-start; }
  .install-cta .btn { width: 100%; }
}
@media (max-width: 480px) {
  .container { padding-inline: 20px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .nav .brand-slash, .nav .brand-suffix { display: none; }
}

/* RTL overrides ----------------------------------------------------------- */
[dir="rtl"] body {
  font-family: "Vazirmatn", var(--sans);
}
[dir="rtl"] .hero-title,
[dir="rtl"] .section-title,
[dir="rtl"] .feature-title,
[dir="rtl"] .step-title {
  font-family: "Vazirmatn", var(--sans);
  letter-spacing: 0;
}
[dir="rtl"] .hero-title {
  font-weight: 700;
  line-height: 1.25;
}
[dir="rtl"] .section-title { line-height: 1.3; }
[dir="rtl"] .eyebrow,
[dir="rtl"] .feature-label,
[dir="rtl"] .step-number,
[dir="rtl"] .hero-meta,
[dir="rtl"] .badge,
[dir="rtl"] .arch-list,
[dir="rtl"] .lang-switch,
[dir="rtl"] .terminal-title,
[dir="rtl"] .site-footer p,
[dir="rtl"] .brand,
[dir="rtl"] .install-cta-text,
[dir="rtl"] .btn {
  /* keep JetBrains Mono for code/version/labels even on Persian page */
  font-family: var(--mono);
}
[dir="rtl"] .hero-sub,
[dir="rtl"] .section-lede,
[dir="rtl"] .feature-desc,
[dir="rtl"] .step-body {
  font-family: "Vazirmatn", var(--sans);
  line-height: 1.85;
}
[dir="rtl"] .feature::before { inset-inline-start: -1px; }

/* Reduced motion --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .cursor { animation: none; opacity: 1; }
  .reveal { opacity: 1; transform: none; }
}
