:root {
  --paper: #f7f2e9;
  --paper-2: #efe8db;
  --ink: #1c2b26;
  --pine: #16302a;
  --rust: #c2622b;
  --gold: #d9a441;
  --line: #d8cfbf;
  --soft: #6b7a72;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

/* header */
.site-header {
  display: flex; align-items: baseline; gap: 14px;
  padding: 22px clamp(20px, 6vw, 72px);
}
.brand { font-family: 'Fraunces', Georgia, serif; font-weight: 800; font-size: 24px; letter-spacing: 0.04em; }
.brand-dot { color: var(--rust); }
.brand-tag { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--soft); }

/* hero */
.hero {
  position: relative;
  padding: clamp(48px, 9vw, 110px) clamp(20px, 6vw, 72px) 0;
  overflow: hidden;
}
.kicker {
  font-size: 12px; letter-spacing: 0.22em; color: var(--rust);
  font-weight: 600; margin-bottom: 22px;
}
.hero h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  max-width: 900px;
}
.hero h1 em { font-style: italic; color: var(--pine); }
.hero-sub { max-width: 640px; margin-top: 26px; color: #3d4d46; font-size: 17px; }
.hero-stats { margin-top: 26px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pine); font-weight: 600; }
.hero-stats .sep { color: var(--rust); margin: 0 10px; }
.ridge { display: block; width: 100%; height: 90px; margin-top: 40px; will-change: transform; }
.ridge path { fill: var(--pine); }

/* film grain */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 2000; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
}

/* per-region editorial themes */
body[data-region="himachal"]      { --rust:#c2622b; --pine:#16302a; }
body[data-region="uttarakhand"]   { --rust:#b98a2f; --pine:#1d3a2f; }
body[data-region="ladakh"]        { --rust:#c9803e; --pine:#1f2d42; }
body[data-region="kashmir"]       { --rust:#b5442c; --pine:#24382e; }
body[data-region="northeast"]     { --rust:#7a9a3b; --pine:#20392e; }
body[data-region="rajasthan"]     { --rust:#c2521e; --pine:#4a2c1a; }
body[data-region="kerala"]        { --rust:#2e7d5b; --pine:#0f2e26; }
body[data-region="western-ghats"] { --rust:#3f7a44; --pine:#12261c; }
body, .planner, .trip-summary, .day-card, .trip-notes, .chip, .btn-primary, .btn-ghost, select {
  transition: background-color .5s ease, border-color .5s ease, color .5s ease;
}

/* editorial edition line + mood */
.edition { font-size: 11px; letter-spacing: 0.24em; color: var(--gold); text-transform: uppercase; margin-bottom: 2px; }
.mood { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: 14.5px; color: #cfd8cc; margin: 8px 0 14px; }

/* motion */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.day-card { animation: rise .55s cubic-bezier(.2,.7,.3,1) both; }
.trip-summary { animation: fadein .5s ease both; }
.trip-notes { animation: fadein .6s ease both; }
::selection { background: var(--rust); color: #fff; }
select:focus, input:focus, button:focus-visible { outline: 2px solid var(--rust); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .day-card, .trip-summary, .trip-notes { animation: none; }
  .ridge { transform: none !important; }
}

/* sections */
main { padding: 0 clamp(20px, 6vw, 72px); }
.section-title {
  font-family: 'Fraunces', Georgia, serif; font-weight: 600;
  font-size: clamp(28px, 4vw, 44px); margin-bottom: 6px;
}
.section-sub { color: var(--soft); margin-bottom: 30px; }

/* planner */
.planner {
  margin: clamp(48px, 8vw, 90px) 0;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(24px, 4vw, 48px);
  box-shadow: 0 18px 50px rgba(22, 48, 42, 0.07);
}
.field { margin-bottom: 26px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 720px) { .field-row { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.label-note, .region-note { font-weight: 400; color: var(--soft); font-size: 12px; }
.region-chip {
  display: inline-block; background: var(--paper-2); border: 1px solid var(--line);
  padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 14px;
}
input[type="range"] { width: 100%; accent-color: var(--rust); height: 28px; }
select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; font: inherit; font-size: 15px; color: var(--ink);
}
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.freetext-row { margin-top: 14px; }
.freetext-row label { font-weight: 400; font-size: 12.5px; color: var(--soft); margin-bottom: 6px; }
.freetext-row input {
  width: 100%; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 10px;
  background: #fff; font: inherit; font-size: 15px; color: var(--ink);
}
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 9px 16px; border-radius: 999px; font: inherit; font-size: 14px; cursor: pointer;
  transition: all .15s ease;
}
.chip.on { background: var(--pine); color: #f3efe6; border-color: var(--pine); }
.chip:hover { border-color: var(--rust); }
.actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.btn-primary {
  background: var(--rust); color: #fff; border: none; border-radius: 12px;
  padding: 15px 30px; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}
.btn-primary:hover { background: #a9521f; transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--pine); border: 1px solid var(--pine);
  border-radius: 12px; padding: 15px 24px; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer;
}
.btn-ghost:disabled { opacity: .35; cursor: default; }

/* results */
.hidden { display: none; }
.results { margin: clamp(48px, 8vw, 90px) 0; }
.results-grid { display: grid; grid-template-columns: 340px 1fr; gap: 34px; align-items: start; }
@media (max-width: 860px) { .results-grid { grid-template-columns: 1fr; } }
.trip-summary {
  background: var(--pine); color: #ece7da; border-radius: 18px; padding: 30px 28px;
  position: sticky; top: 20px;
}
.trip-summary .trip-code { font-size: 11px; letter-spacing: 0.2em; color: var(--gold); text-transform: uppercase; }
.trip-summary h3 { font-family: 'Fraunces', Georgia, serif; font-size: 26px; font-weight: 600; margin: 10px 0 4px; line-height: 1.15; }
.trip-summary .base { color: #b8c4b6; font-size: 14px; margin-bottom: 18px; }
.trip-summary dl { font-size: 14px; }
.trip-summary dt { color: var(--gold); font-weight: 600; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; margin-top: 14px; }
.trip-summary dd { margin-top: 2px; color: #e4dfd2; }
.trip-summary .warn { margin-top: 18px; background: rgba(194,98,43,.25); border: 1px solid rgba(217,164,65,.5); border-radius: 10px; padding: 12px 14px; font-size: 13px; }

.trip-days { display: flex; flex-direction: column; gap: 0; }
.day-card {
  position: relative; border: 1px solid var(--line); background: #fffdf8;
  border-radius: 16px; padding: 26px 28px; margin-bottom: 18px;
}
.day-card .day-no {
  font-family: 'Fraunces', Georgia, serif; font-size: 13px; font-weight: 700;
  letter-spacing: 0.18em; color: var(--rust); text-transform: uppercase;
}
.day-card h4 { font-family: 'Fraunces', Georgia, serif; font-size: 23px; font-weight: 600; margin: 6px 0 10px; }
.day-card p { color: #37463f; font-size: 15px; }
.day-card .log {
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line);
  font-size: 13px; color: var(--soft);
}
.day-card .log strong { color: var(--pine); }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.tag {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600;
  color: var(--pine); background: var(--paper-2); border-radius: 999px; padding: 4px 11px;
}
.trip-notes {
  margin-top: 8px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--paper-2); padding: 26px 28px;
}
.trip-notes h4 { font-family: 'Fraunces', Georgia, serif; font-size: 20px; margin-bottom: 12px; }
.trip-notes ul { padding-left: 20px; color: #37463f; font-size: 14.5px; }
.trip-notes li { margin-bottom: 8px; }
.results-actions { margin-top: 22px; }
.copied { margin-top: 12px; font-size: 13px; color: var(--rust); font-weight: 600; opacity: 0; transition: opacity .3s; }
.copied.show { opacity: 1; }

/* anti section */
.anti { margin: clamp(48px, 8vw, 100px) 0; max-width: 820px; }
.anti-line { font-family: 'Fraunces', Georgia, serif; font-size: clamp(17px, 2.4vw, 22px); font-style: italic; color: var(--pine); line-height: 1.7; }
.anti-sub { margin-top: 14px; color: var(--soft); font-size: 14px; }

/* footer */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 40px;
  padding: 30px clamp(20px, 6vw, 72px) 40px;
  font-size: 12.5px; color: var(--soft);
}

@media print {
  .site-header, .hero, .planner, .anti, .site-footer, .results-actions, .copied { display: none !important; }
  .results-grid { grid-template-columns: 1fr; }
  .trip-summary { position: static; background: #fff; color: var(--ink); border: 1px solid var(--line); }
  .trip-summary dt, .trip-summary .trip-code { color: var(--rust); }
  .trip-summary dd, .trip-summary .base { color: var(--ink); }
  .day-card { break-inside: avoid; }
  body { background: #fff; }
}
