/* ========================================================================
   Clara's Critters — main stylesheet
   Hand-written, mobile-first. Palette = Sunny Meadow (see §5 of spec).
   ======================================================================== */

/* ---------- Tokens ---------- */
:root {
  --color-bg:        #FFF8EC;
  --color-bg-alt:    #FBEFD6;
  --color-primary:   #2F6F5E;
  --color-primary-d: #1F4F44;
  --color-accent:    #E0725C;
  --color-accent-d:  #C45A45;
  --color-highlight: #F2C14E;
  --color-text:      #2B2B2B;
  --color-text-soft: #5B5B5B;
  --color-rule:      #E8DDC4;
  --color-card:      #FFFFFF;

  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(43, 43, 43, 0.06), 0 2px 6px rgba(43, 43, 43, 0.05);
  --shadow:    0 4px 12px rgba(43, 43, 43, 0.08), 0 12px 28px rgba(43, 43, 43, 0.06);

  --container: 1120px;
  --gutter: clamp(1rem, 4vw, 2rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg { max-width: 100%; height: auto; display: block; }
ul { list-style: none; padding: 0; margin: 0; }
a { color: var(--color-primary); text-decoration-color: rgba(47,111,94,0.35); text-underline-offset: 3px; }
a:hover { color: var(--color-primary-d); text-decoration-color: currentColor; }

button { font: inherit; cursor: pointer; }

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--color-primary);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 1000;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

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

:focus-visible {
  outline: 3px solid var(--color-highlight);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-primary-d);
  margin: 0 0 0.6rem;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 5vw + 1rem, 3.6rem); }
h2 { font-size: clamp(1.7rem, 2.4vw + 1rem, 2.4rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1rem; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}
.section + .section { border-top: 1px solid var(--color-rule); }

.section-header {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 2.5rem;
}
.section-header p { color: var(--color-text-soft); margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  border: none;
  font-size: 1rem;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--color-accent-d);
  color: #fff;
  transform: translateY(-1px);
  text-decoration: none;
  box-shadow: var(--shadow);
}
.btn-block { display: block; width: 100%; }

/* ---------- Header & nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 236, 0.92);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--color-rule);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-primary-d);
  text-decoration: none;
}
.brand-mark { font-size: 1.5rem; }

.primary-nav ul {
  display: flex;
  gap: 1.4rem;
  align-items: center;
}
.primary-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
}
.primary-nav a:hover { color: var(--color-primary); }
.nav-cta {
  background: var(--color-primary);
  color: #fff !important;
  padding: 0.5rem 1rem;
  border-radius: 999px;
}
.nav-cta:hover { background: var(--color-primary-d); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  padding: 0;
  position: relative;
}
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  position: absolute;
  left: 11px;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle-bar:nth-child(1) { top: 14px; }
.nav-toggle-bar:nth-child(2) { top: 21px; }
.nav-toggle-bar:nth-child(3) { top: 28px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-rule);
    box-shadow: var(--shadow-sm);
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem var(--gutter) 1.25rem;
    gap: 0.25rem;
  }
  .primary-nav li a {
    display: block;
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--color-rule);
  }
  .primary-nav li:last-child a { border-bottom: none; }
  .nav-cta { text-align: center; margin-top: 0.5rem; }
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 5rem);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(242, 193, 78, 0.20), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(224, 114, 92, 0.15), transparent 60%),
    var(--color-bg);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.hero-copy h1 { margin-bottom: 0.4rem; }
.tagline {
  font-size: clamp(1.1rem, 1.6vw + 0.5rem, 1.4rem);
  color: var(--color-text);
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}
.hero-sub {
  color: var(--color-text-soft);
  margin-bottom: 1.6rem;
}
.hero-microcopy {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--color-text-soft);
}
.hero-badge { margin-right: 0.15rem; }
.hero-photo picture, .hero-photo img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

@media (min-width: 800px) {
  .hero-inner {
    grid-template-columns: 1.05fr 1fr;
  }
}

/* ---------- Services ---------- */
.section-services { background: var(--color-bg-alt); }
.service-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .service-grid { grid-template-columns: repeat(3, 1fr); }
}
.service-card {
  background: var(--color-card);
  padding: 1.5rem 1.4rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-rule);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.service-emoji {
  display: inline-block;
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.6rem;
}
.service-card h3 {
  margin: 0 0 0.4rem;
  color: var(--color-primary-d);
}
.service-card p {
  margin: 0;
  color: var(--color-text-soft);
}

/* ---------- Rates ---------- */
.rates-table-wrap {
  background: var(--color-card);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.rates-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
  table-layout: auto;
}
.rates-table th,
.rates-table td {
  text-align: left;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--color-rule);
  vertical-align: top;
}
.rates-table thead th {
  background: var(--color-bg-alt);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-primary-d);
  white-space: nowrap; /* never break a column header mid-word */
}
.rates-table tbody tr:last-child th,
.rates-table tbody tr:last-child td {
  border-bottom: none;
}
.rates-table tbody th,
.rates-table tbody td {
  overflow-wrap: break-word;
}
.rates-table .price {
  font-weight: 600;
  color: var(--color-primary-d);
  white-space: nowrap;
}
.rates-table .duration { white-space: nowrap; }

/* Mobile + small tablets: drop the Notes column so the table fits without
   horizontal scroll. Breakpoint is 768px so iPad Mini portrait also gets
   the stripped-down view. Using tr > *:nth-child(4) so it targets the 4th
   cell whether it's a <th> or <td>. */
@media (max-width: 768px) {
  .rates-table {
    font-size: 0.94rem;
  }
  .rates-table th,
  .rates-table td {
    padding: 0.75rem 0.7rem;
  }
  .rates-table tr > *:nth-child(4) {
    display: none;
  }
}
.rates-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--color-text-soft);
  text-align: center;
}

/* ---------- About ---------- */
.section-about { background: var(--color-bg-alt); }
.about-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.about-photo picture,
.about-photo img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}
@media (min-width: 800px) {
  .about-inner {
    grid-template-columns: 0.8fr 1.2fr;
  }
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}
.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-card);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-rule);
}
.gallery-item picture,
.gallery-item img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
}
.gallery-caption {
  margin: 0;
  padding: 0.7rem 0.9rem;
  font-size: 0.85rem;
  color: var(--color-text-soft);
}

/* ---------- Testimonials ---------- */
.section-testimonials { background: var(--color-bg-alt); }
.testimonial-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 800px) {
  .testimonial-grid { grid-template-columns: repeat(3, 1fr); }
}
.testimonial {
  background: var(--color-card);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.testimonial::before {
  content: "\201C";
  position: absolute;
  top: -0.6rem;
  left: 1rem;
  font-family: var(--font-display);
  font-size: 4rem;
  line-height: 1;
  color: var(--color-highlight);
}
.testimonial blockquote {
  margin: 0 0 1rem;
}
.testimonial blockquote p {
  margin: 0;
  font-style: italic;
  color: var(--color-text);
}
.testimonial-meta {
  font-size: 0.9rem;
  color: var(--color-text-soft);
}
.testimonial-meta strong { color: var(--color-primary-d); }

/* ---------- Contact ---------- */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
@media (min-width: 900px) {
  .contact-inner {
    grid-template-columns: 0.9fr 1.1fr;
  }
}
.contact-details {
  margin: 1.5rem 0 0;
  padding: 0;
}
.contact-details > div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.5rem 1rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--color-rule);
}
.contact-details > div:last-child { border-bottom: 1px solid var(--color-rule); }
.contact-details dt {
  font-weight: 600;
  color: var(--color-primary-d);
}
.contact-details dd {
  margin: 0;
  color: var(--color-text);
}
.texts-welcome {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-accent-d);
  background: rgba(224, 114, 92, 0.12);
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
}

/* Form */
.contact-form {
  background: var(--color-card);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 1.05rem; }
.field label {
  display: block;
  font-weight: 600;
  color: var(--color-primary-d);
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}
.field .optional {
  font-weight: 400;
  color: var(--color-text-soft);
  font-size: 0.85em;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font: inherit;
  border: 1.5px solid var(--color-rule);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 111, 94, 0.18);
}
.field small {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--color-text-soft);
}
.field textarea { resize: vertical; min-height: 120px; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-primary-d);
  color: #F5EFD9;
  padding: 2.5rem 0;
  text-align: center;
}
.site-footer a { color: #FBE8B8; }
.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}
.footer-meta { margin: 0 0 0.6rem; font-size: 0.9rem; }
.footer-copy { margin: 0; font-size: 0.8rem; opacity: 0.75; }

/* ---------- Thanks page ---------- */
.section-thanks {
  min-height: 60vh;
  display: flex;
  align-items: center;
}
.thanks-inner {
  text-align: center;
  max-width: 36rem;
}
.thanks-inner .lead {
  font-size: 1.15rem;
  color: var(--color-text-soft);
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
