/* ── Design tokens (matching rental-generator palette) ───────────────────── */
:root {
  --bg:          hsl(40, 33%, 98%);
  --fg:          hsl(100, 14%, 17%);
  --border:      hsl(38, 24%, 89%);
  --card:        hsl(0, 0%, 100%);
  --muted-bg:    hsl(40, 20%, 94%);
  --muted-fg:    hsl(100, 10%, 40%);
  --accent-bg:   hsl(38, 30%, 92%);
  --primary:     hsl(11, 56%, 52%);     /* terracotta */
  --primary-dk:  hsl(11, 56%, 44%);
  --secondary:   hsl(180, 30%, 20%);   /* dark teal */
  --secondary-lt:hsl(180, 25%, 30%);

  --font-sans:   'Outfit', sans-serif;
  --font-serif:  'Playfair Display', serif;

  --radius-sm:   0.375rem;
  --radius:      0.625rem;
  --radius-lg:   1rem;
  --radius-xl:   1.5rem;

  --shadow-sm:   0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:   0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.05);
  --shadow-lg:   0 10px 30px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.06);

  --header-h:    64px;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.25;
  color: var(--fg);
}

p { color: var(--fg); }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

ul { list-style: none; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: 760px; }

.section {
  padding: 80px 0;
}
.section--muted {
  background: var(--muted-bg);
}
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-bottom: 12px;
  text-align: center;
}
.section-lead {
  color: var(--muted-fg);
  font-size: 1.05rem;
  text-align: center;
  max-width: 600px;
  margin: 0 auto 40px;
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}
.card h2 {
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  margin-bottom: 12px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary:hover {
  background: var(--primary-dk);
  box-shadow: 0 4px 14px hsla(11, 56%, 52%, 0.35);
  text-decoration: none;
}
.btn-primary:active { transform: scale(0.975); }

.btn-sm  { font-size: 0.875rem; padding: 9px 18px; }
.btn-lg  { font-size: 1.05rem;  padding: 15px 32px; border-radius: var(--radius-lg); }
.btn-full { width: 100%; }

/* ── Sticky header ───────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(253, 251, 248, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.2s ease;
}
.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.logo span { color: var(--primary); }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  padding: 96px 0 80px;
  text-align: center;
}
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
}
.badge {
  display: inline-block;
  background: var(--accent-bg);
  color: var(--secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.hero-title {
  font-size: clamp(2rem, 6vw, 3.2rem);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--muted-fg);
  max-width: 580px;
  margin: 0 auto 36px;
}
.hero-note {
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--muted-fg);
}

/* ── Trust badges ────────────────────────────────────────────────────────── */
.trust-section {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.trust-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 32px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted-fg);
}
.trust-icon { font-size: 1rem; }

/* ── Feature grid ────────────────────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
  margin-top: 32px;
}
.feature-item { padding: 0; }
.feature-num {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  opacity: 0.5;
  line-height: 1;
  margin-bottom: 10px;
}
.feature-item h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.feature-item p {
  font-size: 0.92rem;
  color: var(--muted-fg);
}

/* ── Language grid ───────────────────────────────────────────────────────── */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}
.lang-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}
.lang-flag { font-size: 1.5rem; }
.lang-name { font-size: 0.85rem; font-weight: 600; color: var(--fg); }

/* ── Document breakdown ──────────────────────────────────────────────────── */
.doc-breakdown {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-top: 0;
}
.doc-col { flex: 1; }
.doc-col h3 {
  font-size: 1rem;
  margin-bottom: 14px;
  color: var(--secondary);
}
.doc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.doc-list li {
  font-size: 0.92rem;
  color: var(--fg);
  padding-left: 18px;
  position: relative;
}
.doc-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}
.doc-formats {
  font-size: 0.8rem;
  color: var(--muted-fg);
  font-weight: 500;
  letter-spacing: 0.04em;
}
.doc-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
}

/* ── Steps ───────────────────────────────────────────────────────────────── */
.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 560px;
  margin: 40px auto 0;
}
.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.step-num {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px hsla(11, 56%, 52%, 0.3);
}
.step-body h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  margin-top: 8px;
}
.step-body p {
  font-size: 0.92rem;
  color: var(--muted-fg);
}
.step-connector {
  width: 2px;
  height: 32px;
  background: var(--border);
  margin-left: 21px;
}

/* ── Price card ──────────────────────────────────────────────────────────── */
.price-card {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}
.price-header {
  margin-bottom: 28px;
}
.price-header h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}
.price-amount {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
}
.price-period {
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted-fg);
  font-family: var(--font-sans);
}
.price-features {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.price-features li {
  font-size: 0.95rem;
  color: var(--fg);
}
.price-note {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--muted-fg);
}

/* ── Legal / Details ─────────────────────────────────────────────────────── */
.legal-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
}
.legal-summary {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.legal-summary::-webkit-details-marker { display: none; }
.legal-summary::after {
  content: '﹢';
  font-size: 1.2rem;
  color: var(--primary);
  transition: transform 0.2s ease;
}
details[open] .legal-summary::after {
  content: '﹣';
}
.legal-body {
  padding: 0 24px 24px;
  border-top: 1px solid var(--border);
}
.legal-body p {
  font-size: 0.9rem;
  color: var(--muted-fg);
  margin-top: 14px;
  line-height: 1.7;
}
.legal-body strong { color: var(--fg); }
.legal-body code {
  background: var(--muted-bg);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: Menlo, monospace;
}

/* ── FAQ accordion ───────────────────────────────────────────────────────── */
.faq-list {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.faq-question {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--fg);
  user-select: none;
  line-height: 1.4;
  transition: background 0.15s;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question:hover { background: var(--muted-bg); }
.faq-question::after {
  content: '﹢';
  font-size: 1.2rem;
  color: var(--primary);
  flex-shrink: 0;
  margin-left: 16px;
}
details[open] .faq-question::after { content: '﹣'; }
.faq-answer {
  padding: 0 24px 20px;
  border-top: 1px solid var(--border);
}
.faq-answer p {
  font-size: 0.92rem;
  color: var(--muted-fg);
  line-height: 1.7;
  margin-top: 14px;
  margin-bottom: 0;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--secondary);
  color: rgba(255,255,255,0.75);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
}
.footer-logo span { color: hsl(11, 70%, 68%); }
.footer-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-nav a {
  color: rgba(255,255,255,0.65);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-nav a:hover { color: #fff; }
.footer-copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* ── Cookie banner ───────────────────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  width: calc(100% - 40px);
  max-width: 600px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.35s ease;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner.hidden  { display: none; }

@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.cookie-inner {
  padding: 20px 24px;
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.cookie-text {
  flex: 1;
  min-width: 200px;
  font-size: 0.87rem;
  color: var(--muted-fg);
  line-height: 1.5;
  margin: 0;
}
.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.btn-cookie-decline {
  padding: 9px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted-fg);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-cookie-decline:hover {
  background: var(--muted-bg);
  color: var(--fg);
}
.btn-cookie-accept {
  padding: 9px 18px;
  border-radius: var(--radius);
  border: none;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-cookie-accept:hover { background: var(--primary-dk); }

/* ── Fade-in animation ───────────────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Header right group ──────────────────────────────────────────────────── */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.header-link:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
  text-decoration: none;
}

/* ── Language selector container ─────────────────────────────────────────── */
/* #language-selector is an empty div — JS injects the button + dropdown      */
#language-selector {
  position: relative;
  display: block; /* never hidden */
}
.lang-switcher {
  position: relative;
}

.lang-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--fg);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  line-height: 1;
}
.lang-switcher-btn:hover {
  background: var(--muted-bg);
  border-color: var(--primary);
}
.lang-switcher-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

#lang-flag { font-size: 1rem; }
#lang-code  { letter-spacing: 0.04em; }
.lang-arrow {
  font-size: 0.6rem;
  color: var(--muted-fg);
  margin-left: 1px;
  transition: transform 0.18s ease;
}
.lang-switcher-btn[aria-expanded="true"] .lang-arrow {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 200;
  min-width: 110px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  list-style: none;
  padding: 4px;
  margin: 0;
  animation: dropIn 0.15s ease;
}
.lang-dropdown[hidden] { display: none; }

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lang-dropdown li {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--fg);
  cursor: pointer;
  transition: background 0.12s;
  white-space: nowrap;
}
.lang-dropdown li:hover {
  background: var(--muted-bg);
  color: var(--primary);
}
.lang-dropdown li span {
  font-size: 1rem;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

/* Tablet — 768px */
@media (max-width: 768px) {
  .hero { padding: 72px 0 60px; }
  .hero-title { font-size: clamp(1.75rem, 6vw, 2.6rem); }
  .hero-sub { font-size: 1rem; }

  .section { padding: 64px 0; }
  .section-title { font-size: clamp(1.4rem, 4vw, 1.9rem); }

  .card { padding: 28px; }

  .steps { max-width: 100%; }

  .price-card { max-width: 100%; }

  /* Header: hide the Generate CTA on tablet to prevent overflow */
  .header-right .btn-primary { display: none; }
}

/* Mobile — 640px */
@media (max-width: 640px) {
  /* Header: stack to two lines or shrink aggressively */
  .header-inner { padding: 0 16px; }
  .logo { font-size: 1.15rem; }

  /* Hide blog nav link — keep only the language selector */
  .header-right .header-link { display: none; }

  .header-right { gap: 8px; }
}

/* Mobile — 680px */
@media (max-width: 680px) {
  .lang-grid { grid-template-columns: repeat(2, 1fr); }
  .doc-breakdown {
    flex-direction: column;
    gap: 24px;
  }
  .doc-divider { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 48px; }
  .section { padding: 48px 0; }
  .card { padding: 20px; }
  .cookie-inner { flex-direction: column; align-items: flex-start; }
  .cookie-actions { width: 100%; }
  .btn-cookie-accept, .btn-cookie-decline { flex: 1; text-align: center; }

  /* Footer: tighten */
  .footer-nav { gap: 16px; }
  .footer-nav a { font-size: 0.82rem; }

  /* FAQ */
  .faq-question { font-size: 0.93rem; padding: 16px 18px; }
  .faq-answer { padding: 0 18px 16px; }
}

/* Small mobile — 400px */
@media (max-width: 400px) {
  .lang-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-list { flex-direction: column; align-items: flex-start; padding: 0 8px; }

  .container { padding: 0 16px; }
  .hero-title { font-size: 1.65rem; }
  .badge { font-size: 0.72rem; padding: 4px 10px; }

  /* Footer wraps to single column */
  .footer-nav { flex-direction: column; align-items: center; gap: 10px; }
}

/* Prevent horizontal overflow globally */
html, body { max-width: 100%; overflow-x: hidden; }
