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

/* ============================================
   HAP HOUSE — BRAND SYSTEM
   ============================================ */

:root {
  --heartwood: #5A3A1E;
  --loam: #7A6249;
  --fieldstone: #C9B99A;
  --linen: #F2E9DB;
  --fallow: #1E3D2B;
  --ember: #E36522;
  --amber: #F4A62A;
  --linen-dark: #E6DCCC;
  --white: #FAF7F2;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Spectral', Georgia, serif;

  --spacing-xs: 0.4rem;
  --spacing-sm: 0.85rem;
  --spacing-md: 1.25rem;
  --spacing-lg: 2rem;
  --spacing-xl: 2.5rem;

  --max-width: 860px;
  --nav-height: 70px;
}

/* ============================================
   RESET & BASE
   ============================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--linen);
  color: var(--heartwood);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

/* Grain texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ============================================
   NAVIGATION
   ============================================ */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background-color: var(--linen);
  border-bottom: 1px solid var(--fieldstone);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  gap: 1rem;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fallow);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.nav-logo img { height: 52px; width: auto; display: block; object-fit: contain; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  list-style: none;
  flex-wrap: nowrap;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--loam);
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active { color: var(--heartwood); }

.nav-cta {
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--linen) !important;
  background-color: var(--fallow);
  padding: 5px 14px;
  border-radius: 2px;
  text-decoration: none;
  transition: background-color 0.2s ease !important;
  white-space: nowrap;
}

.nav-cta:hover {
  background-color: var(--heartwood) !important;
  color: var(--linen) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background-color: var(--heartwood);
  transition: all 0.3s ease;
}

/* ============================================
   PAGE WRAPPER
   ============================================ */

main { padding-top: var(--nav-height); }

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

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

.hero {
  display: flex;
  align-items: center;
  padding: 2rem 2rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--fieldstone), transparent);
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--heartwood);
  margin-bottom: 1rem;
  max-width: 680px;
}

.hero-tagline em {
  font-style: italic;
  font-weight: 300;
  color: var(--ember);
}

.hero-sub {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--loam);
  max-width: 500px;
  margin-bottom: 0.75rem;
  line-height: 1.8;
}

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

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 2px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-primary { background-color: var(--fallow); color: var(--linen); }
.btn-primary:hover { background-color: var(--heartwood); color: var(--linen); }

.btn-outline {
  background-color: transparent;
  color: var(--heartwood);
  border: 1px solid var(--fieldstone);
}
.btn-outline:hover { background-color: var(--heartwood); color: var(--linen); border-color: var(--heartwood); }

.btn-light { background-color: var(--linen); color: var(--heartwood); }
.btn-light:hover { background-color: var(--fieldstone); color: var(--heartwood); }

/* ============================================
   SECTIONS
   ============================================ */

section {
  padding: 32px 40px;
  border-bottom: 1px solid var(--fieldstone);
}

section:last-of-type { border-bottom: none; }

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 500;
  color: var(--heartwood);
  margin-bottom: 16px;
}

h2 {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--heartwood);
  margin: 16px 0 8px;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--heartwood);
  margin-bottom: 6px;
}

p {
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.85;
  color: var(--heartwood);
  margin-bottom: 1rem;
  max-width: 720px;
}

p:last-child { margin-bottom: 0; }

.lead {
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.85;
  color: var(--heartwood);
}

.text-loam { color: var(--loam); }

/* ============================================
   DIVIDER — ember accent
   ============================================ */

.divider {
  width: 40px;
  height: 2px;
  background-color: var(--ember);
  margin: 16px 0;
}

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

.page-header {
  padding: 40px 40px 28px;
  border-bottom: 1px solid var(--fieldstone);
}

.page-header .container {
  padding: 0;
  max-width: var(--max-width);
  margin: 0;
}

.page-header h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 500;
  color: var(--heartwood);
  line-height: 1.12;
  max-width: 720px;
}

.page-header .subtitle,
.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ember);
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-body);
}

/* ============================================
   PULL QUOTE
   ============================================ */

.pull-quote {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  line-height: 1.3;
  font-weight: 400;
  color: var(--fallow);
  max-width: 800px;
  margin: 0 0 0.5rem;
}

.pull-quote em {
  font-style: italic;
  color: var(--ember);
}

.pull-quote-sub {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  line-height: 1.3;
  font-weight: 400;
  color: var(--fallow);
  max-width: 800px;
  margin: 0;
}

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

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background-color: var(--fieldstone);
  border: 1px solid var(--fieldstone);
  margin-top: var(--spacing-md);
}

.service-item {
  background-color: var(--linen);
  padding: var(--spacing-md);
  transition: background-color 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.service-item:hover { background-color: var(--linen-dark); }

.service-item h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0;
  color: var(--fallow);
}

.service-item p {
  font-size: 0.85rem;
  color: var(--heartwood);
  margin: 0;
  line-height: 1.6;
  max-width: none;
}

.service-icon {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.2rem;
}

.service-icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.service-icon-green { background-color: var(--linen-dark); border: 2px solid var(--ember); }
.service-icon-ember { background-color: var(--linen-dark); border: 2px solid var(--ember); }
.service-icon-amber { background-color: var(--linen-dark); border: 2px solid var(--ember); }

/* ============================================
   SECTION PRACTICE highlight
   ============================================ */

.section-practice { background-color: var(--linen-dark); }
.section-h2-lg { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 400; }

/* ============================================
   CTA BLOCK
   ============================================ */

.cta-block {
  background-color: var(--heartwood);
  padding: 36px 40px 24px;
  text-align: center;
}

.cta-block h2 {
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--linen);
  margin: 0 0 8px;
}

.cta-block p {
  font-size: 0.85rem;
  color: var(--fieldstone);
  margin: 0 0 16px;
  max-width: none;
}

/* ============================================
   PHASE ITEMS
   ============================================ */

.phase-item {
  padding: 14px 0;
  border-top: 1px solid var(--fieldstone);
  display: flex;
  gap: var(--spacing-md);
  align-items: flex-start;
}

.phase-item:first-of-type { border-top: none; }

.phase-item-icon {
  flex-shrink: 0;
  width: 76px;
  padding-top: 3px;
}

.phase-item-icon img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  opacity: 0.9;
}

.phase-item-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--loam);
  opacity: 0.7;
}

.phase-item-body { flex: 1; }
.phase-item-body h3 { margin-bottom: 4px; }
.phase-item-body p { font-size: 0.88rem; margin-bottom: 1rem; max-width: none; }
.phase-item-body p:last-child { margin-bottom: 0; }

.phase-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 4px;
  display: block;
  font-family: var(--font-body);
}

/* ============================================
   FOUNDER
   ============================================ */

.founder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: var(--spacing-md);
}

.founder-photo img {
  width: 100%;
  display: block;
  border-radius: 2px;
}

.founder-photo-placeholder {
  width: 100%;
  background-color: var(--linen-dark);
  border: 1px solid var(--fieldstone);
  border-radius: 2px;
  aspect-ratio: 4/3;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.founder-caption {
  font-size: 0.75rem;
  color: var(--loam);
  margin-top: 8px;
  font-style: italic;
}

/* ============================================
   CREDENTIALS
   ============================================ */

.credentials {
  list-style: none;
  border-top: 1px solid var(--fieldstone);
  padding-top: 14px;
}

.credentials li {
  font-size: 0.88rem;
  color: var(--loam);
  padding: 7px 0;
  border-bottom: 1px solid var(--linen-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.credentials li:last-child { border-bottom: none; }

.credentials li::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--ember);
  flex-shrink: 0;
}

/* ============================================
   RESOURCE GROUPS
   ============================================ */

.resource-group { margin-bottom: 24px; }

.resource-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember);
  border-bottom: 1px solid var(--fieldstone);
  padding-bottom: 6px;
  margin-bottom: 12px;
  display: block;
  font-family: var(--font-body);
}

.resource-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--linen-dark);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.resource-item:last-child { border-bottom: none; }

.resource-item-icon { flex-shrink: 0; width: 20px; padding-top: 3px; }
.resource-item-icon svg { width: 16px; height: 16px; stroke: var(--fieldstone); }

.resource-title {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--heartwood);
  margin-bottom: 2px;
  line-height: 1.4;
}

.resource-meta {
  font-size: 0.72rem;
  color: var(--loam);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.resource-summary {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--heartwood);
  margin-bottom: 6px;
  line-height: 1.7;
  max-width: none;
}

.resource-link {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fallow);
  text-decoration: none;
  border-bottom: 1px solid var(--fallow);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.resource-link:hover { color: var(--heartwood); border-bottom-color: var(--heartwood); }

/* ============================================
   CRISIS CARDS
   ============================================ */

.crisis-card {
  background-color: var(--heartwood);
  padding: 12px 14px;
  border-radius: 2px;
  margin-bottom: 8px;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  align-items: start;
}

.crisis-card:last-child { margin-bottom: 0; }

.crisis-card-icon svg { width: 18px; height: 18px; stroke: var(--amber); margin-top: 2px; }

.crisis-card-title {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--linen);
  margin-bottom: 3px;
}

.crisis-card-body {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--fieldstone);
  line-height: 1.6;
  margin-bottom: 6px;
  max-width: none;
}

.crisis-card-link {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid var(--amber);
}

.crisis-card-link:hover { color: var(--linen); border-bottom-color: var(--linen); }

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

.contact-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
  margin: var(--spacing-md) 0;
  padding: var(--spacing-md) 0;
  border-top: 1px solid var(--linen-dark);
  border-bottom: 1px solid var(--linen-dark);
}

.contact-highlight-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

.contact-highlight-icon {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background-color: var(--linen-dark);
  border: 2px solid var(--ember);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-highlight-icon img { width: 44px; height: 44px; object-fit: contain; }
.contact-highlight-item p { font-size: 0.78rem; color: var(--loam); line-height: 1.4; margin: 0; max-width: none; }

.contact-form { margin-top: var(--spacing-md); max-width: 520px; }

.form-group { margin-bottom: 12px; }

.form-group label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--loam);
  margin-bottom: 4px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background-color: var(--white);
  border: 1px solid var(--fieldstone);
  border-radius: 2px;
  padding: 8px 10px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--heartwood);
  transition: border-color 0.2s ease;
  outline: none;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus { border-color: var(--ember); }

.form-group textarea { height: 80px; resize: vertical; }

.form-note {
  font-size: 0.95rem;
  color: var(--heartwood);
  font-style: normal;
  margin-top: 20px;
  max-width: none;
  border-top: 1px solid var(--fieldstone);
  padding-top: 16px;
}

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

footer {
  background-color: var(--heartwood);
  padding: 6px 40px 28px;
  text-align: center;
}

.footer-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.footer-logo img {
  height: 160px;
  width: auto;
  opacity: 0.9;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  list-style: none;
  margin-bottom: 6px;
}

.footer-links a {
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fieldstone);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover { color: var(--linen); }

.footer-legal {
  font-size: 0.52rem;
  color: var(--loam);
  letter-spacing: 0.04em;
  text-align: center;
  width: 100%;
  margin: 0 auto;
}

footer.footer-no-cta {
  padding-top: 28px;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fadeUp 0.6s ease forwards; }
.fade-up-delay-1 { animation-delay: 0.12s; opacity: 0; }
.fade-up-delay-2 { animation-delay: 0.24s; opacity: 0; }
.fade-up-delay-3 { animation-delay: 0.36s; opacity: 0; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  nav { padding: 0 1.25rem; }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background-color: var(--linen);
    flex-direction: column;
    padding: 1.25rem;
    border-bottom: 1px solid var(--fieldstone);
    gap: 0.85rem;
  }

  .nav-links.open { display: flex; }
  .nav-cta { display: inline-block; }
  .nav-toggle { display: flex; }

  section { padding: 24px 20px; }
  .page-header { padding: 28px 20px 20px; }
  .cta-block { padding: 28px 20px; }
  footer { padding: 8px 20px; }

  .hero { padding: 1.5rem 1.25rem 1rem; }
  .services-grid { grid-template-columns: 1fr; }
  .founder-grid { grid-template-columns: 1fr; }
  .contact-highlights { grid-template-columns: 1fr; }
  .footer-links { gap: 12px; }
}
