/* ==========================================================================
   Small Town AI — Stylesheet
   Theme: soft cream canvas, deep forest green accents, serif + sans pairing
   ========================================================================== */

:root {
  /* --- Color tokens --- */
  --cream:           #F5F4F0;
  --cream-dim:        #ECEAE3;
  --forest:           #1E3A2B;
  --forest-deep:       #15291F;
  --olive:            #6E7F5C;
  --olive-light:      #9CAA85;
  --ink:              #25291F;
  --ink-soft:         #4B4F44;
  --line:             #D8D5CB;
  --cream-on-forest:  #F5F4F0;

  /* --- Type --- */
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  /* --- Layout --- */
  --max-w: 1140px;
  --radius: 14px;
  --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

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

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* Subtle paper-grain texture overlay across the whole canvas */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(30,58,43,0.025) 0, transparent 45%),
    radial-gradient(circle at 80% 60%, rgba(30,58,43,0.03) 0, transparent 50%);
}

:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 244, 240, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--forest);
}

.brand-leaf {
  width: 26px;
  height: 26px;
  color: var(--olive);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  color: var(--forest);
}

.nav-cta {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--forest);
  border: 1.5px solid var(--forest);
  padding: 9px 18px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--forest);
  color: var(--cream);
}

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding: 0;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  /* Real small-town main-street-at-sunset photograph */
  background-image: url('images/hero-town.jpg');
  background-size: cover;
  background-position: center 65%;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Darken + warm the photo slightly so the light text stays readable */
  background:
    linear-gradient(180deg, rgba(21,29,21,0.35) 0%, rgba(21,29,21,0.32) 45%, rgba(15,23,17,0.78) 100%),
    linear-gradient(90deg, rgba(15,23,17,0.45) 0%, rgba(15,23,17,0.05) 45%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding-top: 120px;
  padding-bottom: 130px;
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--forest-deep);
  background: rgba(245, 244, 240, 0.65);
  border: 1px solid rgba(30, 58, 43, 0.25);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 28px;
}

.eyebrow-leaf {
  width: 13px;
  height: 13px;
  color: var(--olive);
}

.hero-brand {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2.6rem, 6.2vw, 4.6rem);
  line-height: 1.05;
  color: var(--cream);
  margin-bottom: 18px;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 18px rgba(0,0,0,0.35);
}

.hero-slogan {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  color: var(--cream);
  margin-bottom: 18px;
  max-width: 34ch;
  text-shadow: 0 2px 14px rgba(0,0,0,0.4);
}

.hero-desc {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  color: rgba(245, 244, 240, 0.92);
  max-width: 46ch;
  margin-bottom: 36px;
  text-shadow: 0 1px 10px rgba(0,0,0,0.35);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 16px 30px;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-primary {
  background: var(--forest);
  color: var(--cream);
  box-shadow: 0 8px 24px rgba(21, 41, 31, 0.35);
}

.btn-primary:hover {
  background: var(--forest-deep);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(21, 41, 31, 0.4);
}

.btn-secondary {
  background: var(--olive-light);
  color: var(--forest-deep);
  width: 100%;
}

.btn-secondary:hover {
  background: #AAB890;
  transform: translateY(-1px);
}

/* ==========================================================================
   LEAF DIVIDER
   ========================================================================== */

.leaf-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0;
  max-width: 320px;
  margin: 0 auto;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: var(--olive-light);
  opacity: 0.7;
}

.divider-leaf {
  width: 20px;
  height: 20px;
  color: var(--olive);
  flex-shrink: 0;
}

.leaf-divider.light .divider-line { background: rgba(245,244,240,0.35); }
.leaf-divider.light .divider-leaf { color: var(--olive-light); }

section.problem {
  position: relative;
}

.leaf-divider:not(.light) {
  margin-top: 56px;
}

/* ==========================================================================
   PROBLEM & SOLUTION
   ========================================================================== */

.problem {
  padding: 64px 0 72px;
}

.problem-text {
  font-family: var(--font-sans);
  font-size: clamp(1.05rem, 2.1vw, 1.35rem);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.problem-text strong {
  color: var(--forest);
  font-weight: 700;
}

/* ==========================================================================
   SERVICES
   ========================================================================== */

.services {
  padding: 24px 0 96px;
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  color: var(--forest);
  text-align: center;
  margin-bottom: 44px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.service-card {
  background: #FAF9F5;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(30, 58, 43, 0.08);
  border-color: var(--olive-light);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--cream-dim);
  border: 1.5px solid var(--olive-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--forest);
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.service-card h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--forest);
  margin-bottom: 10px;
  line-height: 1.3;
}

.service-card p {
  font-family: var(--font-sans);
  font-size: 0.96rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ==========================================================================
   CONTACT
   ========================================================================== */

.contact {
  position: relative;
  background: var(--forest);
  color: var(--cream);
  padding: 80px 0 88px;
  overflow: hidden;
}

.contact-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 80% at 85% 0%, rgba(255,255,255,0.06) 0%, transparent 60%),
    radial-gradient(50% 60% at 10% 100%, rgba(255,255,255,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.contact-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.contact .leaf-divider {
  margin-bottom: 32px;
}

.contact-heading {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.6vw, 2.3rem);
  line-height: 1.25;
  text-align: center;
  color: var(--cream);
  margin-bottom: 44px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field label {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--olive-light);
  letter-spacing: 0.01em;
}

.form-field input,
.form-field textarea {
  font-family: var(--font-sans);
  font-size: 0.98rem;
  color: var(--cream);
  background: rgba(245, 244, 240, 0.07);
  border: 1.5px solid rgba(245, 244, 240, 0.25);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
  resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(245, 244, 240, 0.45);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--olive-light);
  background: rgba(245, 244, 240, 0.12);
}

.contact-form .btn-secondary {
  margin-top: 8px;
  padding: 16px 30px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  background: var(--forest-deep);
  color: var(--cream);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.footer-brand {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--cream);
}

.footer-brand .brand-leaf {
  color: var(--olive-light);
}

.footer-tag {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: rgba(245, 244, 240, 0.7);
  font-style: italic;
}

.footer-copy {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: rgba(245, 244, 240, 0.45);
  margin-top: 8px;
}

/* ==========================================================================
   RESPONSIVE — TABLET
   ========================================================================== */

@media (max-width: 880px) {
  .hero-inner {
    padding-top: 96px;
    padding-bottom: 100px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   RESPONSIVE — MOBILE
   ========================================================================== */

@media (max-width: 560px) {
  .container { padding: 0 20px; }

  .header-inner { padding-top: 14px; padding-bottom: 14px; }

  .brand-name { font-size: 1.1rem; }

  .nav-cta {
    font-size: 0.78rem;
    padding: 8px 14px;
  }

  .hero-inner {
    padding-top: 76px;
    padding-bottom: 80px;
    text-align: left;
  }

  .hero-brand { font-size: clamp(2.1rem, 9vw, 2.6rem); }

  .hero-slogan { max-width: 100%; }

  .hero-desc { max-width: 100%; }

  .btn-primary {
    width: 100%;
    text-align: center;
    padding: 16px 22px;
  }

  .problem { padding: 48px 0 56px; }

  .services { padding: 16px 0 72px; }

  .service-card { padding: 26px 22px; }

  .form-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .contact { padding: 64px 0 72px; }

  .contact-heading { margin-bottom: 36px; }
}

@media (max-width: 380px) {
  .hero-brand { font-size: 2rem; }
  .eyebrow { font-size: 0.72rem; padding: 6px 12px; }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .service-card { transition: none; }
}
