/* ===== APNANAGA — Design System =====
   Inspired by All Star Pros bold editorial + Naga earth palette.
   Deep forest green (hills) + terracotta (spice) + warm cream (rice paper).
*/

:root {
  /* Naga palette */
  --forest: #234636;         /* deep forest green — hero bg, nav dark */
  --forest-deep: #0f2419;    /* darkest — hero gradient bottom */
  --moss: #3a6b4e;           /* mid green — accents on light bg */
  --terracotta: #c9601e;     /* CTA + accent */
  --terracotta-bright: #e37b30;
  --clay: #a8451c;           /* deep terracotta — hover states */
  --cream: #faf5ec;          /* warm cream — page bg */
  --cream-soft: #f2ebda;     /* slightly darker section bg */
  --sand: #ded1b6;           /* borders, dividers */
  --ink: #1e1a12;            /* body text — deep warm brown-black */
  --ink-soft: #4a4030;
  --muted: #8a7d63;
  --white: #ffffff;

  /* System */
  --shadow: 0 12px 40px rgba(35, 70, 54, 0.12);
  --shadow-lg: 0 20px 60px rgba(35, 70, 54, 0.18);
  --radius: 12px;
  --radius-lg: 18px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  line-height: 1.6;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Headings — Fraunces for editorial warmth */
h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  letter-spacing: -0.015em;
  color: var(--ink);
}

/* ===== NAV ===== */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(35, 70, 54, 0.98);
  backdrop-filter: blur(12px);
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; }

.logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  letter-spacing: 3px;
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
}
.logo .star {
  color: var(--terracotta-bright);
  font-size: 22px;
  line-height: 1;
}

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 500;
  font-size: 14.5px;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--terracotta-bright); }

.nav-cta {
  background: var(--terracotta);
  color: var(--white) !important;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700 !important;
  transition: background 0.2s, transform 0.15s;
}
.nav-cta:hover { background: var(--terracotta-bright); transform: translateY(-1px); }

@media (max-width: 780px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ===== HERO ===== */
.hero {
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.06) 0%, transparent 55%),
    radial-gradient(circle at 80% 70%, rgba(201, 96, 30, 0.18) 0%, transparent 55%),
    linear-gradient(140deg, var(--forest-deep) 0%, var(--forest) 100%);
  color: var(--white);
  padding: 90px 0 110px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.05) 0, transparent 2px),
    radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.05) 0, transparent 2px);
  background-size: 60px 60px;
  opacity: 0.5;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  padding: 9px 20px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.28);
  margin-bottom: 28px;
  transition: background 0.2s, border-color 0.2s;
}
.badge:hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.45); }

.hero h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 900;
  font-size: clamp(38px, 6.5vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  color: var(--white);
}
.accent { color: var(--terracotta-bright); font-weight: 900; font-style: italic; }

.sub {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.86);
  max-width: 620px;
  margin: 0 auto 36px;
  line-height: 1.55;
}

/* Inline chat sits inside the hero */
.hero-chat {
  max-width: 640px;
  margin: 8px auto 36px;
  text-align: left;
}

.hero-or {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 500px;
  margin: 20px auto 20px;
}
.hero-or-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}
.hero-or-text {
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
}

.hero-direct-cta {
  display: inline-block;
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  padding: 14px 30px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
}
.hero-direct-cta:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}
.hero-direct-sub {
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  margin: 12px 0 30px;
}

.trust-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
  flex-wrap: wrap;
  margin-top: 8px;
}
.trust-row span { color: rgba(255, 255, 255, 0.75); }

/* ===== SECTIONS ===== */
section { padding: 90px 0; }

.section-title {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: clamp(30px, 4.5vw, 46px);
  line-height: 1.15;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.section-sub {
  text-align: center;
  color: var(--ink-soft);
  font-size: 17px;
  max-width: 640px;
  margin: 0 auto 56px;
  line-height: 1.55;
}
.section-sub strong { color: var(--terracotta); }

/* ===== HOW ===== */
.how { background: var(--cream); }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.step {
  background: var(--white);
  padding: 40px 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--sand);
  box-shadow: var(--shadow);
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.step-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 44px;
  color: var(--terracotta);
  letter-spacing: 2px;
  line-height: 1;
  margin-bottom: 16px;
}
.step h3 { font-size: 22px; font-weight: 700; margin-bottom: 10px; color: var(--ink); }
.step p { color: var(--ink-soft); font-size: 15.5px; }

@media (max-width: 820px) { .steps { grid-template-columns: 1fr; gap: 20px; } }

/* ===== STANDARDS ===== */
.standards { background: var(--cream-soft); }
.standards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.standard {
  background: var(--white);
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--sand);
  transition: transform 0.2s, box-shadow 0.2s;
}
.standard:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--terracotta); }
.check {
  color: var(--terracotta);
  font-size: 30px;
  line-height: 1;
  margin-bottom: 14px;
}
.standard h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; color: var(--ink); }
.standard p { color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; }

@media (max-width: 900px) { .standards-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .standards-grid { grid-template-columns: 1fr; } }

/* ===== NEIGHBORHOODS ===== */
.neighborhoods-section { background: var(--cream); }

.neigh-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.neigh-card {
  background: var(--white);
  padding: 30px 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--sand);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.neigh-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: linear-gradient(180deg, var(--terracotta), var(--terracotta-bright));
  opacity: 0.85;
}
.neigh-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.neigh-tag {
  display: inline-block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--moss);
  margin-bottom: 10px;
  font-weight: 700;
}
.neigh-card h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink);
}
.neigh-price {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: 24px;
  color: var(--terracotta);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.neigh-card p { color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; }

.neigh-note {
  text-align: center;
  margin-top: 40px;
  color: var(--ink-soft);
  font-size: 15px;
}
.neigh-note a { color: var(--terracotta); font-weight: 600; text-decoration: none; }
.neigh-note a:hover { color: var(--clay); text-decoration: underline; }

@media (max-width: 900px) { .neigh-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .neigh-grid { grid-template-columns: 1fr; } }

/* ===== BEYOND ===== */
.beyond { background: var(--forest); color: var(--white); }
.beyond .section-title { color: var(--white); }
.beyond .section-sub { color: rgba(255, 255, 255, 0.75); }

.beyond-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}
.beyond-card {
  background: rgba(255, 255, 255, 0.06);
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
}
.beyond-q {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 18px;
  color: var(--white);
  margin-bottom: 10px;
  line-height: 1.4;
}
.beyond-a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14.5px;
  line-height: 1.55;
}

@media (max-width: 720px) { .beyond-grid { grid-template-columns: 1fr; } }

/* ===== APPLY ===== */
.apply { background: var(--cream-soft); }

.apply-form {
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--sand);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.apply-form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.apply-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.apply-form label span { display: block; }
.apply-form label em { color: var(--muted); font-style: normal; font-weight: 400; }

.apply-form input,
.apply-form select,
.apply-form textarea {
  padding: 12px 14px;
  border: 1.5px solid var(--sand);
  border-radius: 8px;
  background: var(--cream);
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.2s, background 0.2s;
}
.apply-form input:focus,
.apply-form select:focus,
.apply-form textarea:focus {
  outline: none;
  border-color: var(--terracotta);
  background: var(--white);
}
.apply-form textarea { resize: vertical; min-height: 80px; }

.apply-btn {
  background: var(--terracotta);
  color: var(--white);
  padding: 15px;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.15s;
}
.apply-btn:hover { background: var(--terracotta-bright); transform: translateY(-1px); }

.form-disclaimer {
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
  margin: 0;
}
.form-note { text-align: center; min-height: 1.2rem; }
.form-note.ok { color: var(--moss); font-weight: 600; }

@media (max-width: 600px) {
  .apply-form { padding: 28px 22px; }
  .apply-form .row { grid-template-columns: 1fr; }
}

/* ===== FOOTER ===== */
.footer {
  background: var(--forest-deep);
  color: rgba(255, 255, 255, 0.75);
  padding: 60px 0 30px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 40px;
  margin-bottom: 40px;
}
.foot-brand .logo { margin-bottom: 12px; }
.foot-brand p {
  font-family: 'Fraunces', serif;
  font-style: italic;
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
  max-width: 260px;
}
.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.foot-cols h4 {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--terracotta-bright);
  margin-bottom: 14px;
  font-weight: 700;
}
.foot-cols a {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14.5px;
  padding: 4px 0;
  transition: color 0.2s;
}
.foot-cols a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

@media (max-width: 780px) {
  .footer-inner { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: 1fr 1fr; gap: 22px; }
}

/* ===== (Old widget styles kept minimal for legacy) ===== */
.naga-fab { display: none !important; }
.naga-panel-legacy-hide {
  position: fixed; bottom: 24px; right: 24px; z-index: 101;
  width: 400px; max-width: calc(100vw - 32px);
  height: 620px; max-height: calc(100vh - 48px);
  background: var(--white);
  border-radius: 22px;
  display: flex; flex-direction: column;
  box-shadow: 0 25px 70px rgba(15, 36, 25, 0.3);
  overflow: hidden;
  border: 1px solid var(--sand);
}
.naga-header {
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--forest), var(--forest-deep));
  color: var(--white);
  display: flex; justify-content: space-between; align-items: center;
  flex-shrink: 0;
  min-height: 60px;
}
.naga-title { display: flex; gap: 12px; align-items: center; }
.naga-mark {
  font-size: 1.8rem;
  color: var(--terracotta-bright);
  line-height: 1;
}
.naga-name {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: 17px;
}
.naga-sub {
  font-size: 12px;
  opacity: 0.75;
  letter-spacing: 0.02em;
}
.naga-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: var(--white);
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.naga-close:hover { background: rgba(255, 255, 255, 0.28); }

.naga-messages {
  flex: 1; overflow-y: auto;
  padding: 18px 16px 12px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--cream);
}
.msg { display: flex; }
.msg.user { justify-content: flex-end; }
.msg.bot { justify-content: flex-start; }
.bubble {
  max-width: 84%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14.5px;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.bubble p {
  margin: 0;
}
.bubble p + p {
  margin-top: 8px;
}
.msg.user .bubble {
  background: var(--terracotta);
  color: var(--white);
  border-bottom-right-radius: 4px;
}
.msg.bot .bubble {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--sand);
  border-bottom-left-radius: 4px;
}
.bubble strong { font-weight: 700; }
.bubble em { font-style: italic; }
.bubble a { color: var(--terracotta); text-decoration: underline; }
.bubble ul { margin: 6px 0 0; padding-left: 18px; }
.bubble ul li { margin: 2px 0; }
.bubble ul:first-child { margin-top: 0; }
.bubble code {
  background: rgba(35, 70, 54, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'SF Mono', Consolas, monospace;
}
.msg.user .bubble code { background: rgba(255,255,255,0.2); color: var(--white); }

.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--muted);
  animation: typing 1.3s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

.naga-suggest {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px 14px;
  background: var(--cream);
  border-top: 1px solid var(--sand);
}
.naga-suggest button {
  background: var(--white);
  border: 1px solid var(--sand);
  color: var(--ink-soft);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.2s;
}
.naga-suggest button:hover {
  background: var(--terracotta);
  color: var(--white);
  border-color: var(--terracotta);
}

.naga-input {
  display: flex; gap: 8px;
  padding: 14px 16px;
  background: var(--white);
  border-top: 1px solid var(--sand);
}
.naga-input input {
  flex: 1;
  padding: 11px 16px;
  border: 1.5px solid var(--sand);
  border-radius: 999px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--cream);
  transition: border-color 0.2s, background 0.2s;
}
.naga-input input:focus {
  outline: none;
  border-color: var(--terracotta);
  background: var(--white);
}
.naga-input button {
  background: var(--terracotta);
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 42px; height: 42px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}
.naga-input button:hover { background: var(--terracotta-bright); }

@media (max-width: 480px) {
  .naga-panel {
    bottom: 0; right: 0; left: 0;
    width: 100%; height: 100vh; max-height: 100vh;
    border-radius: 0;
  }
  .naga-fab { bottom: 16px; right: 16px; }
}
