/* =========================================================
   Serendipity Solutions — Base & Components
   ========================================================= */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--teal-600); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--teal-500); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }

p { color: var(--text-secondary); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

/* ============= HEADER / NAV ============= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 253, 252, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink-900);
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--teal-300) 0%, var(--lav-300) 100%);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 4px;
  background: var(--surface);
  opacity: 0.5;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  list-style: none;
}
.nav-links a {
  color: var(--ink-700);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.is-active {
  color: var(--teal-600);
  border-bottom-color: var(--teal-400);
}

.nav-cta {
  background: var(--orange-500);
  color: #fff !important;
  padding: 9px 18px !important;
  border-radius: var(--radius-pill);
  border-bottom: none !important;
  font-weight: 600 !important;
  transition: all var(--transition);
}
.nav-cta:hover {
  background: var(--orange-600);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink-700);
  margin: 4px 0;
  transition: var(--transition);
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--surface);
    padding: var(--space-5);
    gap: var(--space-4);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
  }
  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

/* ============= BUTTONS ============= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--orange-500);
  color: #fff;
}
.btn-primary:hover {
  background: var(--orange-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: #fff;
}
.btn-secondary {
  background: transparent;
  color: var(--teal-600);
  border-color: var(--teal-300);
}
.btn-secondary:hover {
  background: var(--teal-50);
  color: var(--teal-700);
}

/* ============= HERO ============= */
.hero {
  padding: var(--space-9) 0 var(--space-8);
  background:
    radial-gradient(ellipse 80% 60% at 80% 0%, var(--lav-50) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 0% 30%, var(--teal-50) 0%, transparent 60%),
    var(--bg);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--teal-50);
  color: var(--teal-700);
  border: 1px solid var(--teal-100);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--space-5);
}
.hero-eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--teal-400);
}

.hero h1 { max-width: 18ch; margin-bottom: var(--space-5); }
.hero h1 em {
  font-style: normal;
  color: var(--teal-600);
  background: linear-gradient(120deg, var(--teal-400), var(--lav-400));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.lede {
  font-size: 1.15rem;
  max-width: 56ch;
  margin-bottom: var(--space-6);
  color: var(--ink-700);
}

.hero-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* ============= SECTIONS ============= */
section { padding: var(--space-8) 0; }

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lav-500);
  margin-bottom: var(--space-3);
}

.section-intro {
  max-width: 60ch;
  margin-bottom: var(--space-7);
  font-size: 1.05rem;
}

/* ============= TWO-COLUMN DIRECTIONS ============= */
.directions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}
@media (max-width: 820px) {
  .directions-grid { grid-template-columns: 1fr; }
}

.direction-card {
  position: relative;
  padding: var(--space-7);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  overflow: hidden;
}
.direction-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.direction-card.tea {
  background: linear-gradient(160deg, var(--teal-50) 0%, var(--surface) 60%);
}
.direction-card.lav {
  background: linear-gradient(160deg, var(--lav-50) 0%, var(--surface) 60%);
}

.direction-card .icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: grid; place-items: center;
  margin-bottom: var(--space-5);
}
.direction-card.tea .icon { background: var(--teal-200); color: var(--teal-700); }
.direction-card.lav .icon { background: var(--lav-200); color: var(--lav-500); }

.direction-card h3 { margin-bottom: var(--space-3); }
.direction-card p  { margin-bottom: var(--space-5); }

.tag-list {
  display: flex; flex-wrap: wrap; gap: 8px;
  list-style: none;
  margin-bottom: var(--space-5);
}
.tag-list li {
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  color: var(--ink-700);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--teal-600);
  font-weight: 600;
}
.card-link::after {
  content: "→";
  transition: transform var(--transition);
}
.card-link:hover::after { transform: translateX(4px); }

/* ============= FEATURES GRID ============= */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-6);
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: all var(--transition);
}
.feature:hover {
  border-color: var(--teal-200);
  box-shadow: var(--shadow-md);
}

.feature h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: var(--space-2);
  color: var(--ink-900);
}
.feature p { font-size: 0.95rem; }

/* ============= SUCCESS STORIES ============= */
.stories {
  background: linear-gradient(180deg, var(--bg) 0%, var(--teal-50) 100%);
}

.story-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.story-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.85rem;
  color: var(--ink-500);
}
.story-tag {
  background: var(--teal-100);
  color: var(--teal-700);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.78rem;
}
.story-card.lav .story-tag { background: var(--lav-100); color: var(--lav-500); }

.story-card h4 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--ink-900);
}
.story-card blockquote {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-700);
  border-left: 3px solid var(--teal-300);
  padding-left: var(--space-4);
}
.story-card.lav blockquote { border-left-color: var(--lav-300); }

.story-slot-empty {
  border: 1.5px dashed var(--border-subtle);
  background: transparent;
  box-shadow: none;
  color: var(--ink-300);
  text-align: center;
  justify-content: center;
  font-style: italic;
}

/* ============= FORM ============= */
.contact-form {
  background: var(--surface);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--space-4); }
.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-700);
}
.field input,
.field textarea,
.field select {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--ink-900);
  transition: border-color var(--transition);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--teal-400);
  background: var(--surface);
}
.field textarea { min-height: 130px; resize: vertical; }

.form-status {
  margin-top: var(--space-4);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  display: none;
}
.form-status.success {
  display: block;
  background: var(--teal-50);
  color: var(--teal-700);
  border: 1px solid var(--teal-100);
}
.form-status.error {
  display: block;
  background: #FEF3EB;
  color: var(--orange-700);
  border: 1px solid var(--orange-300);
}

/* ============= FOOTER ============= */
.site-footer {
  background: var(--ink-900);
  color: var(--ink-100);
  padding: var(--space-7) 0 var(--space-5);
  margin-top: var(--space-8);
}
.site-footer a { color: var(--teal-200); }
.site-footer a:hover { color: var(--teal-300); }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-col h5 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-300);
  margin-bottom: var(--space-3);
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col p { color: var(--ink-300); font-size: 0.95rem; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: var(--space-4);
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--ink-300);
}

/* ============= UTILITIES ============= */
.text-center { text-align: center; }
.mt-6 { margin-top: var(--space-6); }
.mb-5 { margin-bottom: var(--space-5); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
