/* Ojai Tree Management — base stylesheet */
/* BioRhyme is loaded via <link> tags in each page's <head> (faster than @import). */

/*
  "Next" (Sven Pels) is a DaFont display typeface, free for personal use only —
  commercial use requires a separate license from the creator. It is NOT bundled
  with this site, so the rules below are commented out: while the files are
  missing every page wastes four requests on 404s, and the fallback sans-serif
  stack in --font is what renders anyway.

  To enable it: buy a commercial license, then put these files in site/fonts/
  and uncomment the block. 'Next' already leads the --font stack, so nothing
  else needs changing.
    site/fonts/Next-Regular.woff2 / site/fonts/Next-Regular.ttf
    site/fonts/Next-Bold.woff2    / site/fonts/Next-Bold.ttf

@font-face {
  font-family: 'Next';
  src: url('../fonts/Next-Regular.woff2') format('woff2'),
       url('../fonts/Next-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Next';
  src: url('../fonts/Next-Bold.woff2') format('woff2'),
       url('../fonts/Next-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
*/

:root {
  --forest: #24402f;
  --forest-light: #3d6b4a;
  --sage: #7c9b7e;
  --sage-light: #e7efe4;
  --bark: #6b4f3a;
  --cream: #faf8f3;
  --white: #ffffff;
  --text: #26291f;
  --text-light: #55594a;
  --accent: #c2703d;
  --accent-dark: #a35a2d;
  --border: #e1ddd0;

  --font: 'Next', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: 'BioRhyme', Georgia, 'Times New Roman', serif;
  --max-width: 1120px;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--forest-light);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--forest);
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

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

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 0.5em;
  display: block;
}

.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--white);
}

.section-forest {
  background: var(--forest);
  color: var(--white);
}
.section-forest h2, .section-forest h3 { color: var(--white); }
.section-forest .container { text-align: center; }
.section-forest p {
  max-width: 52ch;
  margin: 0 auto 28px;
  color: rgba(255,255,255,0.85);
}
.section-forest .cta-row { justify-content: center; }
.section-forest .btn-outline { color: var(--white); }

.section-head {
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
}
.section-head p { color: var(--text-light); }

/* Centered link below a section's content, e.g. "See all services". */
.section-cta {
  text-align: center;
  margin-top: 36px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover { background: var(--accent-dark); }

.btn-outline {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}
.btn-outline:hover { background: rgba(255,255,255,0.1); }

.btn-forest {
  background: var(--forest);
  color: var(--white);
}
.btn-forest:hover { background: var(--forest-light); }


.cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 243, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--forest);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.logo svg, .logo-mark { flex-shrink: 0; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.96rem;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.phone-link {
  font-weight: 700;
  color: var(--forest);
  text-decoration: none;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 9px; /* keeps the hit area at 44px, the minimum comfortable tap size */
}
.nav-toggle svg { display: block; }

@media (max-width: 1010px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 14px 24px; border-top: 1px solid var(--border); width: 100%; }
  .nav-toggle { display: block; }
  .nav-cta .phone-link span.phone-text { display: none; }
}

/* Hero */
.hero {
  background: linear-gradient(160deg, var(--forest) 0%, var(--forest-light) 55%, var(--sage) 130%);
  color: var(--white);
  padding: 88px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 85% 20%, rgba(255,255,255,0.12), transparent 45%);
}
.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { color: var(--white); }
.hero .eyebrow { color: var(--sage-light); }
.hero .btn-outline { color: var(--white); }
.hero p.lead {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.9);
  max-width: 46ch;
}
.hero-badges {
  display: flex;
  gap: 20px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.hero-badge {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Hero photo. */
.hero-visual {
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 244px;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  box-shadow: 0 16px 36px rgba(0,0,0,0.28);
}

/* Interior pages: a shorter, single-column, centered hero. */
.hero-compact { padding: 56px 0; }
.hero-compact .container {
  grid-template-columns: 1fr;
  text-align: center;
}
.hero-compact p.lead { margin: 0 auto; }

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { order: -1; min-height: 180px; }
}

/* Service cards */
.grid {
  display: grid;
  gap: 28px;
}
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-middle { align-items: center; }

@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* A row of exactly three cards. Dropping to two columns would leave a 2 + 1
   row with a hole in it, so these hold three across until the cards get tight,
   then go straight to a single column. The photo gallery keeps plain .grid-3,
   where six items still divide evenly into two columns. */
@media (max-width: 960px) {
  .grid-trio { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}
@media (max-width: 780px) {
  .grid-trio { grid-template-columns: 1fr; gap: 24px; }
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--sage-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--forest);
}

.service-card p { color: var(--text-light); margin-bottom: 0; }
.value-card p { color: var(--text-light); }

.service-list {
  color: var(--text-light);
  padding-left: 1.2em;
}

/* Running body copy beside a photo, and the estimate page's steps. */
.prose p,
.step p { color: var(--text-light); }

/* Trust badges */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
@media (max-width: 860px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}
.trust-item .icon-badge { margin: 0 auto 14px; }
.trust-item h3 { font-size: 1rem; margin-bottom: 4px; }
.trust-item p { color: var(--text-light); font-size: 0.92rem; margin: 0; }

/* Photos */
.photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  background: var(--sage-light);
}
.photo-square { aspect-ratio: 1; }

figure.photo-figure { margin: 0; }
figure.photo-figure figcaption {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Tips / education cards */
.tip-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.tip-card-body { padding: 28px; }
.tip-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: var(--sage-light);
}
.tip-card .eyebrow { color: var(--forest-light); }
.tip-card p { color: var(--text-light); }

/* Steps for estimate page */
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  margin-bottom: 48px;
}
.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
}
.embed-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  min-height: 480px;
}
.embed-frame iframe {
  width: 100%;
  height: 640px;
  border: none;
  display: block;
}
.embed-placeholder p {
  margin: 0;
  max-width: 44ch;
}
.embed-placeholder {
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  text-align: center;
  padding: 40px;
  color: var(--text-light);
  background: var(--sage-light);
}

.contact-methods {
  display: grid;
  /* auto-fit so the row stays even whether there are two cards or three */
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 32px 0 0;
}
@media (max-width: 760px) {
  .contact-methods { grid-template-columns: 1fr; }
}
.contact-method {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.contact-method .icon-badge { margin: 0 auto 14px; }
.contact-method a { text-decoration: none; font-weight: 700; }

/* Footer */
.site-footer {
  background: var(--forest);
  color: rgba(255,255,255,0.85);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
.site-footer h4 {
  color: var(--white);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.site-footer a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 24px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* On touch screens the footer and contact links need a real tap area; on
   desktop they stay compact, since a pointer does not need the padding. */
@media (max-width: 760px) {
  .site-footer li { margin-bottom: 0; }
  .site-footer li a,
  .contact-method a {
    display: inline-block;
    padding: 13px 0;
  }
}

.logo-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  color: var(--white);
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 12px;
}

/* 404 page */
.error-page {
  padding: 120px 0;
  text-align: center;
}
.error-page p {
  color: var(--text-light);
  max-width: 44ch;
  margin: 0 auto 28px;
}
.error-page .cta-row { justify-content: center; }
.site-footer-slim .footer-bottom { border: none; padding-top: 0; }

