/*
Theme Name: zonnedauw
Theme URI: https://zonnedauw.nl
Author: BlueCT
Description: Bespoke block theme for Zonnedauw, bloemist en plantenkwekerij in Utrecht, Nieuwegein en Houten. Warm botanical editorial: diep bladgroen op warm papier met een terracotta accent, Fraunces display met Spline Sans.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zonnedauw
*/

/* =================================================================
   ATMOSPHERE
   ================================================================= */
:root {
  --motion-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --reveal-time: 0.7s;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Soft botanical wash behind everything. No z-index on .wp-site-blocks > *. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 80% at 12% -10%, rgba(217, 140, 95, 0.10), transparent 55%),
    radial-gradient(110% 90% at 100% 0%, rgba(46, 64, 52, 0.08), transparent 50%),
    var(--wp--preset--color--paper);
}

.wp-site-blocks > * {
  position: relative;
}

main :where(h1, h2, h3) {
  text-wrap: balance;
}

/* Quiet eyebrow label used above section headings */
.eyebrow {
  font-family: var(--wp--preset--font-family--body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wp--preset--color--accent-text);
}

/* Thin botanical rule */
.thin-rule {
  height: 1px;
  background: linear-gradient(90deg, var(--wp--preset--color--accent), transparent);
  border: 0;
}

/* =================================================================
   HEADER CHROME
   ================================================================= */
.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--wp--preset--color--paper) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid rgba(46, 64, 52, 0.10);
}

.nav a:where(:not(.wp-element-button)) {
  text-decoration: none;
  color: var(--wp--preset--color--ink);
  font-size: 0.98rem;
  position: relative;
}
.nav .wp-block-navigation-item__content::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--wp--preset--color--accent-text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--motion-ease);
}
.nav .wp-block-navigation-item:hover .wp-block-navigation-item__content::after,
.nav .current-menu-item .wp-block-navigation-item__content::after {
  transform: scaleX(1);
}

.wp-element-button,
.wp-block-button__link {
  transition: transform 0.25s var(--motion-ease), background 0.25s ease;
}
.wp-element-button:hover,
.wp-block-button__link:hover {
  transform: translateY(-2px);
  background: var(--wp--preset--color--ink-deep);
}

/* =================================================================
   HERO
   ================================================================= */
.hero {
  position: relative;
}
.hero .hero-img img {
  width: 100%;
  height: clamp(420px, 62vh, 680px);
  object-fit: cover;
  border-radius: 6px;
}
/* Overlapping content card on the full-bleed hero */
.hero-card {
  background: var(--wp--preset--color--paper);
  border: 1px solid rgba(46, 64, 52, 0.12);
  border-radius: 6px;
  box-shadow: 0 24px 60px -30px rgba(31, 43, 35, 0.45);
  margin-top: -5.5rem;
  position: relative;
}
.hero-card h1 {
  margin-top: 0;
}

/* Oversized type hero (interior pages) */
.page-hero h1 {
  font-size: clamp(2.6rem, 8vw, 5rem);
}

/* =================================================================
   CARDS (services / offer)
   ================================================================= */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
}
.card {
  background: var(--wp--preset--color--paper);
  border: 1px solid rgba(46, 64, 52, 0.12);
  border-radius: 6px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  transition: transform 0.35s var(--motion-ease), box-shadow 0.35s ease, border-color 0.35s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px -28px rgba(31, 43, 35, 0.5);
  border-color: var(--wp--preset--color--accent);
}
.card .card-index {
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.1rem;
  color: var(--wp--preset--color--accent-text);
}
.card h3 {
  margin: 0.4rem 0 0.6rem;
}

/* =================================================================
   WORK / ALTERNATING ROWS
   ================================================================= */
.feature-row img {
  width: 100%;
  height: clamp(280px, 42vh, 460px);
  object-fit: cover;
  border-radius: 6px;
}

/* =================================================================
   PROCESS / STEPS
   ================================================================= */
.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.steps .step {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(46, 64, 52, 0.14);
  align-items: baseline;
}
.steps .step:last-child {
  border-bottom: 1px solid rgba(46, 64, 52, 0.14);
}
.steps .step-no {
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.6rem;
  color: var(--wp--preset--color--accent-text);
  min-width: 2.5rem;
}

/* =================================================================
   PROOF / QUOTE
   ================================================================= */
.quote-band blockquote {
  border: 0;
  margin: 0;
  padding: 0;
}
.quote-band p {
  font-family: var(--wp--preset--font-family--display);
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  line-height: 1.3;
  font-weight: 400;
  color: var(--wp--preset--color--ink-deep);
}

/* =================================================================
   STATS
   ================================================================= */
.stat .stat-figure {
  font-family: var(--wp--preset--font-family--display);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1;
  color: var(--wp--preset--color--accent-text);
}

/* =================================================================
   CTA BAND
   ================================================================= */
.cta-band {
  border-radius: 8px;
}
.cta-band :where(h2, p) {
  color: var(--wp--preset--color--paper);
}

/* =================================================================
   CONTACT / FORM
   ================================================================= */
.contact-detail a {
  text-decoration: none;
}
.wpcf7 input:not([type="submit"]),
.wpcf7 textarea,
.contact-form input:not([type="submit"]),
.contact-form textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(46, 64, 52, 0.25);
  border-radius: 6px;
  background: var(--wp--preset--color--paper);
  font-family: var(--wp--preset--font-family--body);
  font-size: 1rem;
}
.wpcf7 input:focus-visible,
.wpcf7 textarea:focus-visible {
  outline: 2px solid var(--wp--preset--color--accent-text);
  outline-offset: 2px;
}

/* =================================================================
   FOOTER
   ================================================================= */
.site-footer {
  background: var(--wp--preset--color--ink-deep);
  color: var(--wp--preset--color--paper-deep);
}
.site-footer :where(h2, h3, .footer-brand) {
  color: var(--wp--preset--color--paper);
}
.site-footer a {
  color: var(--wp--preset--color--paper-deep);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--wp--preset--color--accent);
}
.footer-brand {
  font-family: var(--wp--preset--font-family--display);
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1;
}

/* =================================================================
   ACCESSIBILITY: skip link + focus
   ================================================================= */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--wp--preset--color--ink-deep);
  color: var(--wp--preset--color--paper);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 6px 0;
  z-index: 100001;
}
.skip-link:focus {
  left: 0;
}
:where(a, button, input, textarea, .wp-element-button):focus-visible {
  outline: 2px solid var(--wp--preset--color--accent-text);
  outline-offset: 3px;
}

/* =================================================================
   SCROLL REVEAL
   ================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--reveal-time) var(--motion-ease),
    transform var(--reveal-time) var(--motion-ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Hero load stagger */
.hero .reveal { transition-delay: 0.05s; }
.hero-card.reveal { transition-delay: 0.18s; }

/* =================================================================
   MOBILE  (mandatory)
   ================================================================= */
@media (max-width: 781px) {
  .cards { grid-template-columns: 1fr; }
}

@media (max-width: 599px) {
  .wp-site-blocks { padding-inline: 1.25rem; }
  .wrap { padding-inline: 0; }
  .cards { display: flex; flex-direction: column; }
  .steps .step { flex-direction: column; gap: 0.5rem; }
  .hero-card { margin-top: -2.5rem; }
  .hero .hero-img img { height: clamp(320px, 50vh, 420px); }
}

/* Hamburger & close button: 44px tap target, always visible on mobile */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
  color: var(--wp--preset--color--ink-deep) !important;
  min-width: 44px !important;
  min-height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.5rem !important;
}
.wp-block-navigation__responsive-container-open svg,
.wp-block-navigation__responsive-container-close svg {
  width: 28px !important;
  height: 28px !important;
}

/* Bidirectional open/close animation. WP sets display:none by default. */
.wp-block-navigation__responsive-container:not(.is-menu-open) {
  display: flex !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0s linear 0.28s;
}
.wp-block-navigation__responsive-container.is-menu-open {
  display: flex !important;
  position: fixed !important;
  inset: 0 !important;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.28s ease, visibility 0s linear 0s;
  background: var(--wp--preset--color--ink-deep) !important;
  padding: 5rem 1.75rem 2.5rem !important;
  z-index: 100000 !important;
}

.wp-block-navigation__responsive-container.is-menu-open a,
.wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation-item__content {
  font-family: var(--wp--preset--font-family--display) !important;
  font-size: clamp(2rem, 7vw, 3rem) !important;
  font-weight: 500 !important;
  color: var(--wp--preset--color--paper) !important;
  text-decoration: none !important;
  line-height: 1.1 !important;
  padding: 0.6rem 0 !important;
  display: block;
  border-bottom: 1px solid rgba(236, 236, 243, 0.12);
  transition: color 0.2s ease, padding-left 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.wp-block-navigation__responsive-container.is-menu-open a:hover {
  color: var(--wp--preset--color--accent) !important;
  padding-left: 0.5rem !important;
}
/* Kill the underline animation inside the overlay */
.wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation-item__content::after {
  display: none;
}

@media (max-width: 480px) {
  .nav .wp-block-buttons { display: none; }
}

/* =================================================================
   REDUCED MOTION  (mandatory)
   ================================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .wp-block-navigation__responsive-container,
  .wp-block-navigation__responsive-container.is-menu-open {
    transition: none !important;
  }
}
