@font-face {
  font-family: 'Baloo 2';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url(/assets/fonts/baloo600.woff2) format('woff2');
}
@font-face {
  font-family: 'Baloo 2';
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  src: url(/assets/fonts/baloo800.woff2) format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url(/assets/fonts/inter400.woff2) format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url(/assets/fonts/inter600.woff2) format('woff2');
}

/*
  Fixed brand identity per the Ilahle Brand Pack — not light/dark adaptive.
  Forest green and cream carry backgrounds, same as before. Ember orange
  replaces gold as the single accent — rings, prices, calls to action —
  never as a body-text color at length. The icon itself is coal-black,
  traced in ember, on either background (see assets/brand/*.svg).
*/
:root {
  --forest-900: #14261b;
  --forest-800: #1c3a27;
  --coal-900: #1c1614;
  --coal-800: #241c19;
  --ember-500: #e8672c;
  --ember-400: #f0973f;
  --ember-700: #a9560f;
  --cream-50: #faf6ea;
  --cream-100: #f2ecda;
  --sand: #e6d7ae;
  --sage: #a9c2ac;
  --ink-900: #16211a;
  --ink-muted: #4d6155;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--cream-50);
  color: var(--ink-900);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, .brand, .amount { font-family: 'Baloo 2', -apple-system, sans-serif; }

/* ---------- Header (dark forest band, persistent on every page) ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--forest-900);
  border-bottom: 1px solid var(--forest-800);
}

.site-nav {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.brand {
  font-weight: 800;
  font-size: 1.25rem;
  color: #ffffff;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-mark {
  display: inline-flex;
  flex-shrink: 0;
}
.brand-mark svg { width: 44px; height: 44px; display: block; }

.nav-links { display: flex; gap: 1.5rem; font-size: 0.95rem; font-weight: 600; }
.nav-links a { color: var(--sage); }
.nav-links a:hover { color: var(--ember-400); }

main { flex: 1; }

/* ---------- Logo build-in animation: fronds draw in one at a time, trunk
   first, sweeping bottom-right → around → upper-left, then the two
   remaining pieces. Runs once per page load (CSS animations restart
   naturally on reload — no JS needed). ---------- */

@keyframes frondIn {
  0% { opacity: 0; transform: scale(0.25); }
  100% { opacity: 1; transform: scale(1); }
}

/*
  Rotation for each frond lives on a wrapping <g transform="rotate(...)">,
  never on the animated <path> itself — a CSS animation's transform
  replaces an element's SVG transform attribute rather than combining with
  it, so animating scale directly on a rotated path would silently discard
  its rotation. Per-piece delay is set inline (style="animation-delay:...")
  since nth-child can't reliably stagger paths nested at different depths.
*/
.logo-mark path {
  transform-box: fill-box;
  transform-origin: center;
  animation: frondIn 0.5s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .logo-mark path { animation: none; opacity: 1; }
}

/* ---------- Hero (homepage only, continues the dark band) ---------- */

.hero {
  background: var(--forest-900);
  color: var(--cream-50);
  max-width: none;
  margin: 0;
  padding: 4rem 1.5rem 4.5rem;
  text-align: center;
}

.hero .logo-badge {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.5rem;
}
.hero .logo-badge svg { width: 100%; height: 100%; display: block; }

.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.hero .subtitle {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ember-400);
  margin: 0 0 1rem;
}

.hero p.tagline {
  max-width: 32rem;
  margin: 0 auto;
  color: var(--sage);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* ---------- Homepage service grid (cream body) ---------- */

.service-grid {
  max-width: 960px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .service-grid { grid-template-columns: 1fr 1fr; }
}

.service-card {
  position: relative;
  border: 1px solid var(--sand);
  background: var(--cream-100);
  border-radius: 1rem;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--ember-500), var(--ember-700));
}

.service-card:hover { border-color: var(--ember-500); }

.service-icon {
  display: flex;
  justify-content: center;
  width: 100%;
  font-size: 4rem;
  line-height: 1;
}

.service-card h2 { margin: 0; font-size: 1.5rem; color: var(--ink-900); }

.service-card p { margin: 0; color: var(--ink-muted); }

.service-card .eyebrow { text-align: center; color: var(--ember-700); }

.price-tag { color: var(--ember-700); font-weight: 700; }

/* ---------- Service pages (cream body) ---------- */

.page {
  max-width: 42rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.back-home {
  align-self: flex-start;
  color: var(--ember-700);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: -1rem;
}
.back-home:hover { text-decoration: underline; }

/* Hide the back-home link when this page is loaded inside the homepage
   modal iframe — the modal's own close (x) button already covers this. */
body.in-frame .back-home {
  display: none;
}

.eyebrow {
  color: var(--ember-700);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  margin: 0;
}

.page h1 { margin: 0.25rem 0 0; font-size: 2.25rem; color: var(--ink-900); }

.page .subtitle { color: var(--ink-muted); margin: 0.25rem 0 0; }

.pricing-card {
  border: 1px solid var(--sand);
  background: var(--cream-100);
  border-radius: 1rem;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}

.pricing-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--ember-500), var(--ember-700));
}

.pricing-card .amount { font-size: 2.5rem; font-weight: 800; color: var(--ember-700); margin: 0.25rem 0 0; }
.pricing-card .label { color: var(--ink-muted); font-size: 0.9rem; margin: 0; }

.height-input-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}
.height-input-row input {
  width: 6rem;
  padding: 0.5rem 0.75rem;
  font-size: 1.1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--sand);
  background: #ffffff;
  color: var(--ink-900);
}
.height-input-row input:focus-visible {
  outline: 2px solid var(--ember-500);
  outline-offset: 1px;
}
.height-input-row label { color: var(--ink-muted); font-size: 0.95rem; }

.table-heading { font-size: 1.1rem; margin: 0 0 0.75rem; color: var(--ink-900); }

.table-scroll { overflow-x: auto; }

.rate-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.rate-table th, .rate-table td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--sand);
}
.rate-table th { color: var(--ink-muted); font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.04em; }

.feature-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.feature-list li { color: var(--ink-900); }
.feature-list li::before { content: "\2022"; color: var(--ember-500); margin-right: 0.5rem; }

.addon-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink-900);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--sand);
  border-radius: 0.5rem;
  background: var(--cream-50);
}
.addon-row input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--ember-500);
  flex-shrink: 0;
}

.pay-button {
  display: inline-block;
  background: var(--ember-500);
  color: var(--forest-900);
  font-weight: 700;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.9rem 2rem;
  border-radius: 999px;
  border: none;
  text-align: center;
  align-self: flex-start;
  cursor: pointer;
}
.pay-button:hover { filter: brightness(1.06); }
.pay-button:focus-visible { outline: 2px solid var(--ember-500); outline-offset: 3px; }
.pay-button:disabled { opacity: 0.7; cursor: wait; }

.contact-note { color: var(--ink-muted); font-size: 0.9rem; }
.contact-note a { color: var(--ember-700); }
.contact-note a:hover { text-decoration: underline; }

/* ---------- Footer (dark forest band, bookends the header) ---------- */

.site-footer {
  border-top: 1px solid var(--forest-800);
  background: var(--forest-900);
  color: var(--sage);
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
}

.site-footer > * {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem;
}

@media (min-width: 640px) {
  .site-footer > div.footer-wrap { flex-direction: row; }
}

.footer-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.footer-contact {
  display: flex;
  gap: 1rem;
  color: #ffffff;
  font-size: 0.9rem;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem 1.5rem;
  font-weight: 600;
}

/* ---------- Service modal (overlay iframe, opened from homepage cards) ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 38, 27, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-overlay[hidden] { display: none; }

.modal-panel {
  position: relative;
  width: min(100%, 48rem);
  height: min(100%, 44rem);
  background: var(--cream-50);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.modal-panel iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: none;
  background: var(--forest-900);
  color: var(--ember-400);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--forest-800); }
.modal-close:focus-visible { outline: 2px solid var(--ember-500); outline-offset: 2px; }

/* A service page loaded inside the homepage modal iframe hides its own nav/footer
   chrome so the modal doesn't show a duplicate header nested inside itself. */
body.in-frame .site-header,
body.in-frame .site-footer {
  display: none;
}

.footer-contact a:hover { color: var(--ember-400); }
