/* ==========================================================================
   Ramanuja AI — stylesheet
   Design: cream/ivory grounds, deep navy navigation and footer,
   saffron and muted-gold accents, dark readable type, generous whitespace.
   ========================================================================== */

:root {
  --cream: #fbf7ef;
  --ivory: #fffdf8;
  --sand: #f3ead9;
  --parchment: #efe4cf;
  --navy: #14213d;
  --navy-deep: #0e1830;
  --navy-soft: #1d2f52;
  --ink: #22272f;
  --ink-soft: #4a5160;
  --ink-muted: #6b7280;
  --saffron: #d9741f;
  --saffron-deep: #b85e12;
  --gold: #b08d3f;
  --gold-soft: #d8c48a;
  --line: #e3d8c2;
  --line-strong: #d3c4a6;
  --ok: #2f7d4f;
  --warn: #9a6a12;
  --shadow-sm: 0 1px 2px rgba(20, 33, 61, 0.06), 0 1px 3px rgba(20, 33, 61, 0.05);
  --shadow-md: 0 4px 14px rgba(20, 33, 61, 0.08);
  --radius: 10px;
  --radius-sm: 6px;
  --wrap: 1120px;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-sans: "Seravek", "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 0.6em;
  font-weight: 600;
  letter-spacing: 0.005em;
}

h1 { font-size: 2.35rem; }
h2 { font-size: 1.75rem; margin-top: 1.6em; }
h3 { font-size: 1.28rem; margin-top: 1.3em; }
h4 { font-size: 1.06rem; }

p { margin: 0 0 1.05em; }
a { color: var(--saffron-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--navy); }
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

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

ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.35em; }

code, kbd {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.08em 0.35em;
  font-size: 0.9em;
  word-break: break-word;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------------------------------------------------------------- header */

.site-header {
  background: var(--navy);
  color: #f4efe4;
  border-bottom: 3px solid var(--gold);
}

.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 66px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #fff;
  padding: 0.4rem 0;
}
.brand:hover { color: #fff; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-soft);
  object-fit: cover;
  flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 600; letter-spacing: 0.02em; }
.brand-tag { font-size: 0.7rem; color: var(--gold-soft); letter-spacing: 0.14em; text-transform: uppercase; }

.site-nav { display: flex; align-items: center; gap: 0.2rem; flex-wrap: wrap; }
.site-nav a {
  color: #e9e2d3;
  text-decoration: none;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.96rem;
}
.site-nav a:hover { background: var(--navy-soft); color: #fff; }
.site-nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--saffron); }
.site-nav .nav-download {
  border: 1px solid var(--gold);
  color: #fff;
  margin-left: 0.3rem;
}
.site-nav .nav-download:hover { background: var(--saffron-deep); }

.nav-toggle {
  display: none;
  background: transparent;
  color: #fff;
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.7rem;
  font-size: 1rem;
  cursor: pointer;
}

@media (max-width: 780px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 0.6rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.7rem 0.6rem; border-radius: var(--radius-sm); }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--saffron); }
}

/* ------------------------------------------------------------------ hero */

.hero {
  background:
    radial-gradient(1100px 420px at 78% -10%, rgba(217, 116, 31, 0.10), transparent 60%),
    linear-gradient(180deg, var(--ivory), var(--cream));
  border-bottom: 1px solid var(--line);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
  padding-top: 3.2rem;
  padding-bottom: 3.2rem;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  margin-bottom: 1.1rem;
  background: rgba(255, 253, 248, 0.6);
}

.hero h1 { font-size: 2.9rem; margin-bottom: 0.5rem; }
.hero .lede { font-size: 1.16rem; color: var(--ink-soft); max-width: 34em; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.5rem; }

.hero-figure { margin: 0; text-align: center; }
.hero-figure img {
  width: 100%;
  max-width: 360px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-md);
  object-fit: cover;
}
.hero-figure figcaption {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-top: 0.7rem;
  font-style: italic;
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 2rem; padding-top: 2.2rem; }
  .hero h1 { font-size: 2.2rem; }
  .hero-figure { order: -1; }
  .hero-figure img { max-width: 260px; }
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  padding: 0.72rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary { background: var(--saffron-deep); color: #fff; border-color: var(--saffron-deep); }
.btn-primary:hover { background: var(--navy); border-color: var(--navy); color: #fff; }

.btn-secondary { background: transparent; color: var(--navy); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--sand); color: var(--navy); }

.btn-disabled {
  background: var(--sand);
  color: var(--ink-muted);
  border-color: var(--line);
  cursor: not-allowed;
  pointer-events: none;
}

.btn .icon { width: 18px; height: 18px; flex: none; }

/* ---------------------------------------------------------------- layout */

main { display: block; }
.section { padding: 3rem 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-alt { background: var(--ivory); }
.section-navy { background: var(--navy); color: #efe9dc; }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-navy a { color: var(--gold-soft); }

.section-head { max-width: 46em; margin-bottom: 1.6rem; }
.section-head p { color: var(--ink-soft); }
.eyebrow {
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.5rem;
}

.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.panel {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.note {
  background: var(--sand);
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  margin: 1.2rem 0;
}
.note strong { color: var(--navy); }
.note-warn { border-left-color: var(--saffron); background: #fdf3e6; }

/* ------------------------------------------------------------------ page */

.page-hero {
  background: linear-gradient(180deg, var(--ivory), var(--cream));
  border-bottom: 1px solid var(--line);
  padding: 2.6rem 0 2rem;
}
.page-hero h1 { margin-bottom: 0.35rem; }
.page-hero p { color: var(--ink-soft); max-width: 44em; margin-bottom: 0; }

.breadcrumbs { font-size: 0.85rem; color: var(--ink-muted); margin-bottom: 0.8rem; }
.breadcrumbs a { color: var(--ink-muted); }
.breadcrumbs span[aria-current] { color: var(--ink-soft); }

.prose { max-width: 46em; }
.prose h2 { border-bottom: 1px solid var(--line); padding-bottom: 0.35rem; }
.prose h3 { color: var(--navy-soft); }

/* -------------------------------------------------------- download panel */

.download-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
@media (max-width: 760px) { .download-grid { grid-template-columns: 1fr; } }

.dl-card {
  background: var(--ivory);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.dl-card h3 { display: flex; align-items: center; gap: 0.6rem; margin-top: 0; }
.dl-card .platform-icon { width: 28px; height: 28px; flex: none; }
.dl-card .dl-meta { margin: 0.6rem 0 1rem; }
.dl-card .dl-meta dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.9rem; font-size: 0.92rem; }
.dl-card .dl-meta dt { color: var(--ink-muted); }
.dl-card .dl-meta dd { margin: 0; color: var(--ink); word-break: break-word; }
.dl-card .dl-actions { margin-top: auto; display: flex; flex-direction: column; gap: 0.55rem; }
.dl-links { font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.dl-status {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  margin-bottom: 0.6rem;
}
.status-available { background: #e5f1e8; color: var(--ok); border: 1px solid #bcd8c5; }
.status-pending { background: #fdf1dc; color: var(--warn); border: 1px solid #e8d3a6; }

.hash {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  word-break: break-all;
  color: var(--ink-soft);
}

.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li { position: relative; padding-left: 1.6rem; margin-bottom: 0.6rem; }
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  background: var(--saffron);
  border-radius: 2px;
  transform: rotate(45deg);
}

/* -------------------------------------------------------------- doc index */

.toc { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem 2rem; padding: 0; list-style: none; }
@media (max-width: 620px) { .toc { grid-template-columns: 1fr; } }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.3rem;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-family: var(--font-sans);
  font-size: 0.95rem;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.95rem;
}
table.data th, table.data td { text-align: left; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: var(--sand); color: var(--navy); font-family: var(--font-serif); }
.table-scroll { overflow-x: auto; }

details.faq { border-bottom: 1px solid var(--line); padding: 0.5rem 0; }
details.faq summary { cursor: pointer; font-weight: 600; color: var(--navy); padding: 0.4rem 0; }
details.faq summary:hover { color: var(--saffron-deep); }
details.faq p { margin-top: 0.6rem; }

/* ----------------------------------------------------------------- cards */

.card {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- footer */

.site-footer {
  background: var(--navy-deep);
  color: #cfc7b6;
  margin-top: 3rem;
  padding: 2.6rem 0 1.4rem;
  border-top: 3px solid var(--gold);
}
.site-footer a { color: var(--gold-soft); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; gap: 1.4rem; } }
.footer-brand { font-family: var(--font-serif); font-size: 1.3rem; color: #fff; margin-bottom: 0.3rem; }
.footer-tag { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-soft); }
.footer-col h4, .footer-col .footer-col-title { color: #fff; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 0.7rem; font-weight: 600; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.45rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 2rem;
  padding-top: 1.1rem;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.muted { color: var(--ink-muted); }
.small { font-size: 0.88rem; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
