:root {
  --bg: #efe7d6;
  --surface: #f8f4ea;
  --surface-strong: #fffdf8;
  --paper: #fffaf0;
  --ink: #1c1a16;
  --muted: #62594a;
  --line: rgba(28, 26, 22, 0.12);
  --accent: #ae4b28;
  --accent-dark: #8f391a;
  --accent-soft: rgba(174, 75, 40, 0.1);
  --shadow: 0 24px 60px rgba(48, 33, 11, 0.12);
  --radius-lg: 30px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --max-width: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.5), transparent 24rem),
    linear-gradient(180deg, #f4eddf 0%, #efe7d6 100%);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid rgba(174, 75, 40, 0.45);
  outline-offset: 3px;
}

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

button,
input {
  font: inherit;
}

.shell {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 1rem;
  z-index: 100;
  padding: 0.85rem 1rem;
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  left: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(248, 244, 234, 0.82);
  border-bottom: 1px solid rgba(28, 26, 22, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 80px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-badge {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-title,
.footer-brand {
  font-family: "Fraunces", serif;
  font-size: 1.15rem;
  font-weight: 600;
}

.brand-subtitle,
.footer-copy,
.footer-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.locale-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
}

.locale-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.3rem;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(28, 26, 22, 0.1);
  background: rgba(255, 255, 255, 0.45);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.locale-pill:hover,
.locale-pill.is-current {
  color: var(--ink);
  border-color: rgba(174, 75, 40, 0.28);
  transform: translateY(-1px);
}

.site-nav a {
  color: var(--muted);
  transition: color 180ms ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--ink);
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  padding: 0.35rem;
}

.nav-toggle span {
  display: block;
  width: 1.55rem;
  height: 2px;
  margin: 0.32rem 0;
  border-radius: 999px;
  background: var(--ink);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.9rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-small {
  padding: 0.72rem 1rem;
}

.button-primary {
  background: var(--ink);
  color: var(--paper);
}

.button-primary:hover {
  background: #11100e;
}

.button-secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: rgba(28, 26, 22, 0.22);
  background: rgba(255, 255, 255, 0.82);
}

.hero,
.page-hero {
  padding: 4.4rem 0 2rem;
}

.hero-grid,
.page-hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 2rem;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.page-hero-card,
.prose-card,
.workflow-step,
.insight-card,
.route-card,
.faq-grid details {
  border: 1px solid rgba(28, 26, 22, 0.08);
  box-shadow: var(--shadow);
}

main,
section,
footer {
  content-visibility: auto;
  contain-intrinsic-size: 1px 1000px;
}

.hero-copy {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 4vw, 3.2rem);
  border-radius: clamp(1.8rem, 4vw, 3rem);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 248, 235, 0.74)),
    linear-gradient(180deg, rgba(174, 75, 40, 0.05), transparent);
}

.hero-copy::after {
  content: "";
  position: absolute;
  inset: auto -5rem -4rem auto;
  width: 15rem;
  height: 15rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(174, 75, 40, 0.18), rgba(174, 75, 40, 0));
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
}

h1,
h2 {
  font-family: "Fraunces", serif;
  font-weight: 600;
}

h1 {
  max-width: 12ch;
  font-size: clamp(3rem, 7vw, 5.7rem);
  letter-spacing: -0.05em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -0.045em;
}

h3 {
  font-size: 1.2rem;
}

.hero-summary,
.section-heading p,
.page-hero-card p,
.prose-card p,
.route-card p,
.faq-grid p,
.insight-card p,
.workflow-step p,
.footer-copy {
  color: var(--muted);
}

.hero-summary {
  max-width: 62ch;
  margin: 1.25rem 0 0;
  font-size: 1.06rem;
}

.locale-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.hero-notes span {
  padding: 0.56rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(28, 26, 22, 0.08);
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-panel,
.page-hero-card {
  padding: 1.6rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(28, 26, 22, 0.95), rgba(28, 26, 22, 0.9)),
    #1c1a16;
  color: var(--paper);
}

.hero-panel .eyebrow,
.page-hero-card .eyebrow,
.hero-panel p,
.hero-panel a,
.page-hero-card p {
  color: rgba(255, 250, 240, 0.82);
}

.route-ladder,
.anchor-nav,
.insight-stack,
.faq-grid,
.footer-links,
.prose-shell {
  display: grid;
  gap: 1rem;
}

.route-ladder article {
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 250, 240, 0.14);
}

.route-ladder article:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.anchor-nav {
  margin-top: 1.5rem;
}

.anchor-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 250, 240, 0.06);
}

.anchor-nav a::after {
  content: "→";
}

.section {
  padding: 1.5rem 0 4rem;
}

.surface-light {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0));
}

.surface-accent {
  background:
    radial-gradient(circle at top right, rgba(174, 75, 40, 0.18), transparent 20rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0));
}

.section-heading {
  margin-bottom: 1.5rem;
}

.section-heading.narrow {
  max-width: 54rem;
}

.filter-bar {
  margin-bottom: 1.5rem;
  padding: 1.2rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(28, 26, 22, 0.08);
}

.filter-bar label {
  display: block;
  margin-bottom: 0.7rem;
  font-weight: 700;
}

.filter-row {
  display: flex;
  gap: 0.8rem;
}

.filter-row input {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(28, 26, 22, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.filter-row input:focus {
  outline: 2px solid rgba(174, 75, 40, 0.18);
  border-color: rgba(174, 75, 40, 0.35);
}

.filter-summary {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.route-grid-categories {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.route-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 16rem;
  padding: 1.35rem;
  border-radius: 1.5rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 239, 0.86));
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.route-card:hover {
  transform: translateY(-4px);
  border-color: rgba(174, 75, 40, 0.28);
}

.route-card-featured {
  background:
    linear-gradient(180deg, rgba(28, 26, 22, 0.97), rgba(55, 36, 14, 0.96)),
    #1c1a16;
  color: var(--paper);
}

.route-card-featured p,
.route-card-featured .route-meta {
  color: rgba(255, 250, 240, 0.76);
}

.route-index {
  font-family: "Fraunces", serif;
  font-size: 1.45rem;
  color: var(--accent);
}

.route-meta {
  margin-top: auto;
  color: var(--muted);
  font-size: 0.92rem;
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 1.4rem;
  align-items: start;
}

.insight-card,
.prose-card,
.workflow-step,
.faq-grid details {
  padding: 1.4rem;
  border-radius: 1.4rem;
  background: rgba(255, 255, 255, 0.7);
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.workflow-step span {
  display: inline-flex;
  margin-bottom: 0.8rem;
  padding: 0.48rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 800;
}

.cta-band {
  margin-top: 1.4rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1.3rem 1.5rem;
  border-radius: 1.8rem;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(28, 26, 22, 0.08);
}

.faq-grid details summary {
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.faq-grid details summary::-webkit-details-marker {
  display: none;
}

.faq-grid details p {
  margin: 0.9rem 0 0;
}

.empty-state {
  margin-top: 1rem;
  padding: 1.3rem;
  border-radius: 1.4rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(28, 26, 22, 0.08);
}

.mini-link-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.mini-link-grid-wide {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.mini-link-grid a {
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(28, 26, 22, 0.08);
  color: var(--muted);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.mini-link-grid a:hover {
  transform: translateY(-2px);
  border-color: rgba(174, 75, 40, 0.24);
  color: var(--ink);
}

.article-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.2rem;
  align-items: start;
}

.article-sidebar,
.article-block {
  padding: 1.4rem;
  border-radius: 1.4rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(28, 26, 22, 0.08);
  box-shadow: var(--shadow);
}

.article-stack {
  display: grid;
  gap: 1rem;
}

.article-sidebar ul {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.article-sidebar li + li {
  margin-top: 0.5rem;
}

.is-hidden {
  display: none;
}

.site-footer {
  padding: 1rem 0 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 1rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(28, 26, 22, 0.1);
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--ink);
}

.page-hero-card .button {
  margin-top: 1rem;
}

body[data-page="home"] .site-nav a[href="/"],
body[data-page="categories"] .site-nav a[href="/pages/categories.html"],
body[data-page="how"] .site-nav a[href="/pages/how-it-works.html"],
body[data-page="faq"] .site-nav a[href="/pages/faq.html"] {
  color: var(--ink);
}

@media (max-width: 980px) {
  .hero-grid,
  .page-hero-grid,
  .split-layout,
  .article-layout,
  .footer-grid,
  .workflow-grid,
  .route-grid,
  .route-grid-categories,
  .mini-link-grid {
    grid-template-columns: 1fr;
  }

  .site-nav {
    position: absolute;
    inset: calc(100% + 0.5rem) 1rem auto 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    border-radius: 1.5rem;
    background: rgba(255, 250, 240, 0.96);
    border: 1px solid rgba(28, 26, 22, 0.08);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .locale-switcher {
    width: 100%;
    justify-content: flex-start;
  }

  .nav-toggle {
    display: inline-block;
  }

  .header-inner {
    flex-wrap: wrap;
    padding: 0.9rem 0;
  }

  .filter-row,
  .cta-band {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 980px) {
  main,
  section,
  footer {
    content-visibility: visible;
    contain-intrinsic-size: auto;
  }
}

html[dir="rtl"] body {
  direction: rtl;
}

html[dir="rtl"] .brand,
html[dir="rtl"] .site-nav,
html[dir="rtl"] .hero-actions,
html[dir="rtl"] .hero-notes,
html[dir="rtl"] .filter-row,
html[dir="rtl"] .cta-band,
html[dir="rtl"] .locale-switcher {
  flex-direction: row-reverse;
}

@media (max-width: 720px) {
  .hero,
  .page-hero {
    padding-top: 2.6rem;
  }

  h1 {
    font-size: clamp(2.5rem, 12vw, 3.8rem);
  }

  h2 {
    font-size: clamp(1.85rem, 9vw, 2.6rem);
  }

  .header-inner {
    min-height: 72px;
  }

  .shell {
    width: min(calc(100% - 1.2rem), var(--max-width));
  }

  .hero-copy,
  .hero-panel,
  .route-card,
  .faq-grid details,
  .prose-card,
  .workflow-step,
  .insight-card,
  .page-hero-card,
  .filter-bar {
    border-radius: 1.2rem;
  }
}
