/* =============================================
   SUNDIAL SITES — Main Stylesheet
   Palette: Forest & Sand
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Nunito+Sans:wght@300;400;600;700&display=swap');

/* === TOKENS ===
   Variable names kept from the original palette so all rules keep working;
   values remapped to Forest & Sand.
     --amber       -> Forest     (primary / CTA / accents)
     --amber-hover -> Sand       (hover / secondary accent)
     --cream       -> Chalk      (page background)
     --sand        -> Sage Mist  (section / card background)
     --oak         -> Pine       (nav, headings, footer)
     --walnut      -> warm body text
     --terra       -> Forest deep (links / borders)
*/
:root {
  --amber:      #3C6E52;  /* Forest */
  --amber-hover:#CDB082;  /* Sand */
  --cream:      #FBFAF7;  /* Chalk */
  --sand:       #EAEDE8;  /* Sage Mist */
  --oak:        #1B2A20;  /* Pine */
  --walnut:     #4F524C;  /* Warm body text */
  --terra:      #2F5840;  /* Forest deep */
  --white:      #FFFFFF;
  --border:     #DCE0D8;

  --forest:     #3C6E52;  /* explicit accent alias */
  --forest-deep:#2F5840;
  --sand-gold:  #CDB082;
  --stone:      #8A8D85;  /* muted text */

  --font-display: 'Spectral', Georgia, serif;
  --font-body:    'Nunito Sans', system-ui, sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --shadow-card: 0 2px 16px rgba(27,42,32,0.08);
  --shadow-btn:  0 2px 8px rgba(60,110,82,0.28);

  --max-w: 1100px;
  --nav-h: 68px;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--walnut);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--terra); text-decoration: none; }
a:hover { color: var(--amber); }
ul { list-style: none; }

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--oak);
  line-height: 1.2;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* === LAYOUT HELPERS === */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: 80px 0;
}
.section--sand {
  background: var(--sand);
}
.section--white {
  background: var(--white);
}
.section--oak {
  background: var(--oak);
  background-image: radial-gradient(120% 120% at 80% 0%, color-mix(in srgb, var(--oak) 80%, var(--amber)) 0%, var(--oak) 55%);
  color: var(--sand);
  position: relative;
}
.section--oak h2,
.section--oak h3 { color: var(--cream); }

/* === GRAIN TEXTURE OVERLAY === */
.grain { position: relative; }
.grain::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.grain > * { position: relative; z-index: 1; }

.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 12px;
}
.section-header {
  max-width: 600px;
  margin-bottom: 48px;
}
.section-header p {
  font-size: 1.05rem;
  color: var(--walnut);
  margin-top: 12px;
}

.text-center { text-align: center; }
.text-center .section-header,
.section-header.text-center { margin: 0 auto 48px; }

/* === ASYMMETRIC SECTION HEADERS === */
.section-header.offset {
  max-width: 620px;
  margin-left: 0;
  padding-left: 28px;
  border-left: 3px solid var(--amber);
  text-align: left;
  border-radius: 0;
}
.section-header.offset .divider { margin-left: 0; }

/* === TEXTURE: faint dot grid panel === */
.texture-dots { position: relative; }
.texture-dots::before {
  content: '';
  position: absolute;
  top: 24px; right: 24px;
  width: 180px; height: 120px;
  background-image: radial-gradient(var(--amber-hover) 1.4px, transparent 1.4px);
  background-size: 18px 18px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
.texture-dots .container { position: relative; z-index: 1; }
@media (max-width: 768px) {
  .texture-dots::before { display: none; }
}

/* === BUTTONS === */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  border: none;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--amber);
  color: var(--cream);
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover {
  background: var(--amber-hover);
  color: var(--cream);
  box-shadow: 0 4px 16px rgba(194,106,52,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--oak);
  border: 2px solid var(--oak);
}
.btn-outline:hover {
  background: var(--oak);
  color: var(--cream);
}

.btn-outline-light {
  background: transparent;
  color: var(--cream);
  border: 2px solid var(--sand);
}
.btn-outline-light:hover {
  background: var(--sand);
  color: var(--oak);
}

/* === NAVIGATION === */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--oak);
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(245,230,208,0.15);
  transition: height 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.nav.scrolled {
  height: 56px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.28);
  background: color-mix(in srgb, var(--oak) 92%, black);
}
.nav.scrolled .nav__logo { font-size: 1.3rem; }
.nav__logo { transition: font-size 0.3s ease; }
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav__logo-text span {
  color: var(--amber-hover);
}
.nav__logo-mark {
  position: relative;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.nav__logo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.25s ease;
}
.nav__logo-img--hover { opacity: 0; }
.nav__logo:hover .nav__logo-img--default,
.nav__logo:focus-visible .nav__logo-img--default {
  opacity: 0;
}
.nav__logo:hover .nav__logo-img--hover,
.nav__logo:focus-visible .nav__logo-img--hover {
  opacity: 1;
}
/* Header nav: logo mark only on phone, title only on PC/tablet */
.nav .nav__logo-mark { display: none; }
.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__links a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(253,243,231,0.75);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}
.nav__links a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--amber-hover);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav__links a:not(.btn):hover::after {
  transform: scaleX(1);
}
/* Active item: underline is fixed and static (no draw-in on page load) */
.nav__links a:not(.btn).active::after {
  transform: scaleX(1);
  transition: none;
}
.nav__links a:hover,
.nav__links a.active {
  color: var(--cream);
}
.nav__links .btn {
  padding: 9px 22px;
  font-size: 0.8rem;
}
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--cream);
  padding: 4px;
}
.nav__toggle svg { display: block; }

/* === PAGE HERO (shared) === */
.page-hero {
  padding: 140px 0 80px;
  background: var(--oak);
  background-image: radial-gradient(110% 130% at 85% 0%, color-mix(in srgb, var(--oak) 78%, var(--amber)) 0%, var(--oak) 60%);
  color: var(--cream);
  position: relative;
}
.page-hero h1 { color: var(--cream); }
.page-hero p {
  color: rgba(253,243,231,0.75);
  font-size: 1.1rem;
  max-width: 540px;
  margin-top: 16px;
}
.page-hero__breadcrumb {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-hover);
  margin-bottom: 16px;
}

/* === FOOTER === */
.footer {
  background: var(--oak);
  color: rgba(253,243,231,0.7);
  padding: 60px 0 32px;
  position: relative;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer__brand .nav__logo { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 16px; font-size: 1.3rem; }
.footer__brand .nav__logo-mark { width: 28px; height: 28px; }
.footer__brand p { font-size: 0.9rem; line-height: 1.7; }
.footer__col h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-hover);
  margin-bottom: 16px;
}
.footer__col ul { display: flex; flex-direction: column; gap: 10px; }
.footer__col ul a {
  font-size: 0.9rem;
  color: rgba(253,243,231,0.7);
  text-decoration: none;
  transition: color 0.2s;
}
.footer__col ul a:hover { color: var(--cream); }
.footer__bottom {
  border-top: 1px solid rgba(245,230,208,0.15);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.825rem;
  color: rgba(253,243,231,0.45);
}

/* === CARDS === */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(61,37,16,0.12);
}
.card__body { padding: 28px; }

/* === DIVIDER === */
.divider {
  width: 48px;
  height: 3px;
  background: var(--amber);
  border-radius: 2px;
  margin: 16px 0 24px;
}
.text-center .divider { margin: 16px auto 24px; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .nav__links { display: none; flex-direction: column; gap: 0; position: fixed; top: var(--nav-h); left: 0; right: 0; background: var(--oak); padding: 16px 0 24px; border-bottom: 1px solid rgba(245,230,208,0.15); }
  .nav__links.open { display: flex; }
  .nav__links a { padding: 12px 24px; border-radius: 0; width: 100%; }
  .nav__links a::after { display: none; }
  .nav__links .btn { margin: 12px 24px 0; width: calc(100% - 48px); text-align: center; }
  .nav__toggle { display: block; }
  .nav .nav__logo-mark { display: block; }
  .nav .nav__logo-text { display: none; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .footer__bottom { flex-direction: column; gap: 8px; text-align: center; }
}
