/* Juan Lopez Tree Services — draft site
   Palette is unique to this project (not Wright Applied / MTECH). */

@font-face {
  font-family: Fraunces;
  src: url("fonts/Fraunces-Variable.ttf") format("truetype");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Outfit;
  src: url("fonts/Outfit-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --pine-deep: #10261c;
  --pine: #1a3a2a;
  --forest: #234c36;
  --leaf: #3f7a4e;
  --cream: #f6f0e4;
  --paper: #fbf8f2;
  --sand: #e7dcc8;
  --clay: #c45c28;
  --clay-deep: #9a4318;
  --gold: #c9963a;
  --ink: #1a1814;
  --muted: #5a554c;
  --ph: #f3d28a;
  --line: rgba(26, 24, 20, 0.12);
  --line-strong: rgba(26, 24, 20, 0.22);
  --white: #fffdf8;
  --shadow: 0 16px 40px rgba(16, 38, 28, 0.12);
  --header-h: 4.25rem;
  --max: 72rem;
  --ease: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Outfit, "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--forest); }
a:hover { color: var(--clay); }

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

.skip {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  background: var(--white);
  color: var(--ink);
  padding: 0.5rem 0.8rem;
  z-index: 100;
  border-radius: 0.25rem;
}
.skip:focus { top: 0.75rem; }

/* Draft / placeholder language */
.draft-banner {
  background: #ead6a0;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.45;
  padding: 0.65rem 1.25rem;
  text-align: center;
  border-bottom: 1px solid rgba(26, 24, 20, 0.12);
}

.ph {
  display: inline;
  background: var(--ph);
  color: var(--ink);
  font-weight: 600;
  padding: 0.05em 0.28em;
  border-radius: 0.15em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.confirm {
  display: inline-block;
  margin-left: 0.4em;
  padding: 0.08em 0.45em;
  border: 1px solid var(--clay);
  color: var(--clay-deep);
  background: rgba(196, 92, 40, 0.08);
  font-family: Outfit, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  vertical-align: 0.15em;
  line-height: 1.4;
  white-space: nowrap;
}

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

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
.logo:hover { color: var(--ink); }
.logo-mark {
  width: 2.4rem;
  height: 2.4rem;
  flex: 0 0 auto;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.logo-name {
  font-family: Fraunces, Georgia, serif;
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.logo-tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.25rem 1.15rem;
}

.nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav a:hover { color: var(--clay); }

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
  background: var(--white);
  margin-left: 0.35rem;
}
.lang-toggle button {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0.28rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--muted);
}
.lang-toggle button[aria-pressed="true"] {
  background: var(--pine);
  color: var(--cream);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.btn-clay,
.btn-primary {
  background: var(--clay);
  color: var(--white);
  border-color: var(--clay);
}
.btn-clay:hover,
.btn-primary:hover {
  background: var(--clay-deep);
  border-color: var(--clay-deep);
  color: var(--white);
}
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(246, 240, 228, 0.55);
}
.btn-ghost:hover {
  background: rgba(246, 240, 228, 0.12);
  color: var(--white);
}
.btn-header {
  padding: 0.55rem 0.95rem;
  font-size: 0.88rem;
  margin-left: 0.25rem;
}
.btn-header .ph { font-size: 0.88em; }
.nav a.btn-clay,
.nav a.btn-clay:hover {
  color: var(--white);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.4rem;
  background: var(--white);
  cursor: pointer;
  padding: 0;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100svh - 6.7rem);
  display: flex;
  align-items: flex-end;
  color: var(--cream);
  background: var(--pine-deep) url("images/hero-palms-phoenix.jpg") center 45% / cover no-repeat;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(16, 38, 28, 0.18) 0%, rgba(16, 38, 28, 0.28) 38%, rgba(16, 38, 28, 0.88) 100%),
    linear-gradient(90deg, rgba(16, 38, 28, 0.55) 0%, rgba(16, 38, 28, 0.12) 55%, rgba(16, 38, 28, 0.2) 100%);
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 5rem 1.25rem 3.5rem;
  width: 100%;
}
.kicker {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e8c48c;
  margin: 0 0 0.9rem;
}
.hero h1 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 650;
  font-size: clamp(2.25rem, 6.4vw, 4.35rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0 0 1.1rem;
  max-width: 16ch;
  color: var(--cream);
}
.hero-lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.5;
  max-width: 38rem;
  margin: 0 0 0.85rem;
  color: rgba(246, 240, 228, 0.92);
}
.hero-note {
  margin: 0 0 1.6rem;
  color: rgba(246, 240, 228, 0.86);
  max-width: 40rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

/* Sections */
.section {
  padding: 4.25rem 1.25rem;
}
.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}
.section h2 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 650;
  font-size: clamp(1.85rem, 3.2vw, 2.65rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.6rem;
  color: var(--pine-deep);
}
.section-lead {
  max-width: 40rem;
  margin: 0 0 2.2rem;
  color: var(--muted);
}

/* Services */
.services { background: var(--cream); }
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
  gap: 1rem;
}
.service-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 1.3rem 1.25rem 1.4rem;
}
.service-card h3 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  font-size: 1.25rem;
  margin: 0 0 0.45rem;
  letter-spacing: -0.015em;
  color: var(--pine-deep);
}
.service-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}
.icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  background: var(--sand);
  color: var(--pine);
  display: grid;
  place-items: center;
  margin: 0 0 0.9rem;
}
.icon svg { width: 1.35rem; height: 1.35rem; }

/* Commitments */
.commitments { background: var(--paper); }
.commit-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  align-items: stretch;
}
.commit-photo {
  border-radius: 0.9rem;
  overflow: hidden;
  min-height: 16rem;
  background: var(--sand);
}
.commit-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 16rem;
}
.commit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.commit-list li {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 1rem 1.1rem;
}
.commit-list strong {
  display: block;
  font-weight: 650;
  margin-bottom: 0.15rem;
  color: var(--pine-deep);
}
.commit-list p { margin: 0; color: var(--muted); font-size: 0.98rem; }

/* Area */
.area { background: var(--pine); color: var(--cream); }
.area h2 { color: var(--cream); }
.area .section-lead { color: rgba(246, 240, 228, 0.8); }
.city-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}
.city-list li {
  background: rgba(246, 240, 228, 0.1);
  border: 1px solid rgba(246, 240, 228, 0.22);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-weight: 550;
}
.area-note { margin: 0; color: rgba(246, 240, 228, 0.75); }

/* Gallery */
.gallery { background: var(--cream); }
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}
.gallery-item {
  margin: 0;
  position: relative;
  border-radius: 0.7rem;
  overflow: hidden;
  background: var(--sand);
}
.gallery-item img {
  width: 100%;
  height: 14rem;
  object-fit: cover;
}
.gallery-item:nth-child(1),
.gallery-item:nth-child(6) { grid-column: span 2; }
.gallery-item:nth-child(1) img,
.gallery-item:nth-child(6) img { height: 18rem; }
.gallery-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.8rem 0.8rem 0.65rem;
  background: linear-gradient(180deg, transparent, rgba(16, 38, 28, 0.82));
  color: var(--cream);
  font-size: 0.82rem;
  font-weight: 500;
}

/* Estimate / form */
.estimate { background: var(--paper); }
.estimate-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.form-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.4rem 1.3rem 1.5rem;
  box-shadow: var(--shadow);
}
.form-row,
.form-grid {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}
.form-grid { grid-template-columns: 1fr; }
label {
  display: block;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  margin-bottom: 0.3rem;
  color: var(--pine-deep);
}
input[type="text"],
input[type="tel"],
input[type="email"],
select,
textarea {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 0.45rem;
  padding: 0.7rem 0.8rem;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--clay);
  outline-offset: 1px;
  border-color: var(--clay);
}
textarea { min-height: 8rem; resize: vertical; }
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  margin-top: 0.4rem;
}
.form-note, .form-status {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0.9rem 0 0;
}
.form-status[data-state="ok"] { color: var(--forest); font-weight: 550; }
.form-status[data-state="err"] { color: var(--clay-deep); font-weight: 550; }
.fallback-links { margin: 1.1rem 0 0; }
.fallback-links p { margin: 0 0 0.35rem; }

/* FAQ */
.faq { background: var(--cream); }
.faq-list { display: grid; gap: 0.6rem; max-width: 46rem; }
.faq-list details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  padding: 0.15rem 0.2rem;
}
.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.85rem 1rem;
  list-style: none;
  color: var(--pine-deep);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  float: right;
  color: var(--clay);
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1;
}
.faq-list details[open] summary::after { content: "–"; }
.faq-list .faq-a {
  padding: 0 1rem 1rem;
  margin: 0;
  color: var(--muted);
}

/* Footer */
.site-footer {
  background: var(--pine-deep);
  color: rgba(246, 240, 228, 0.82);
  padding: 2.75rem 1.25rem 2rem;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}
.footer-brand .logo-name { color: var(--cream); font-size: 1.25rem; }
.footer-brand .logo-tag { color: #e8c48c; }
.footer-meta, .footer-draft {
  margin: 0;
  font-size: 0.92rem;
}
.footer-draft { color: rgba(246, 240, 228, 0.55); }
.footer-meta a { color: var(--cream); }


@media (max-width: 719px) {
  .hero {
    min-height: 0;
  }
  .hero-inner {
    padding: 2.4rem 1.25rem 2.2rem;
  }
}
@media (min-width: 720px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-item:nth-child(1) { grid-column: span 2; }
  .gallery-item:nth-child(6) { grid-column: span 3; }
  .gallery-item img { height: 16rem; }
  .gallery-item:nth-child(1) img { height: 16rem; object-position: 50% 70%; }
  .gallery-item:nth-child(6) img { height: 18rem; object-position: 50% 40%; }
}

@media (min-width: 900px) {
  .commit-layout { grid-template-columns: 1.05fr 1fr; }
  .estimate-layout { grid-template-columns: 0.9fr 1.1fr; align-items: start; }
  .hero-inner { padding: 7rem 1.5rem 4.25rem; }
  .section { padding: 5rem 1.5rem; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1rem;
    margin: 0;
  }
  .site-header.is-open .nav { display: flex; }
  .nav a { padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
  .nav .btn-header { margin: 0.75rem 0 0.25rem; width: max-content; }
  .lang-toggle { margin: 0.75rem 0 0; width: max-content; }
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-toggle .bars,
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--ink);
  position: relative;
  margin: 0 auto;
}
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle .bars::before { top: -5px; }
.nav-toggle .bars::after { top: 5px; }
