/*
Theme Name: Olive Tree Improvements
Theme URI: https://wwebdesign.co.uk/
Author: W Web Design & Hosting
Author URI: https://wwebdesign.co.uk/
Description: Lean custom theme for Olive Tree Improvements — code-registered ACF blocks, no page builder, no build step.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: olivetreeimprovements
*/

/* ==========================================================================
   Design tokens — the ONLY place cross-block values live.
   Anything used by more than one block belongs here. Anything used by exactly
   one block belongs in that block's own style.css.
   ========================================================================== */

:root {
  /* Brand — measured off the live Elementor build, not invented.
     green  = Elementor global Primary / Kadence "Theme Accent"
     orange = Elementor global Accent — the default button fill */
  --olivetreeimprovements-brand:        #213F15;
  --olivetreeimprovements-brand-dark:   #16290e;
  --olivetreeimprovements-accent:       #E16C43;
  --olivetreeimprovements-accent-dark:  #c85628;
  --olivetreeimprovements-whatsapp:     #65D072;

  /* Surfaces.
     NEVER set a section background to #fff — leave sections transparent so
     they inherit --olivetreeimprovements-bg, and fill --olivetreeimprovements-card-bg on inner cards. */
  --olivetreeimprovements-bg:           #F7FAFC;
  --olivetreeimprovements-card-bg:      #ffffff;
  --olivetreeimprovements-band-bg:      #EDF2F7;
  --olivetreeimprovements-border:       #e2e8f0;

  /* Text */
  --olivetreeimprovements-text:         #2D3748;
  --olivetreeimprovements-text-muted:   #7A7A7A;
  --olivetreeimprovements-text-invert:  #ffffff;

  /* Type */
  --olivetreeimprovements-font:         Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  --olivetreeimprovements-font-heading: Montserrat, Roboto, system-ui, sans-serif;

  /* Layout */
  --olivetreeimprovements-content-max:  1140px;
  --olivetreeimprovements-gutter:       20px;
  --olivetreeimprovements-section-y:    clamp(32px, 4vw, 50px);
  --olivetreeimprovements-radius:       3px;
  --olivetreeimprovements-header-height: 96px;

  /* Motion */
  --olivetreeimprovements-ease:         cubic-bezier(.22,.61,.36,1);
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--olivetreeimprovements-bg);
  color: var(--olivetreeimprovements-text);
  font-family: var(--olivetreeimprovements-font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

/* Headings follow the live build: H1 is Montserrat, everything below it is
   Roboto. That split is deliberate — do not "tidy" it to one family. */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--olivetreeimprovements-font);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .5em;
  color: var(--olivetreeimprovements-brand);
  text-wrap: balance;
}
h1 {
  font-family: var(--olivetreeimprovements-font-heading);
  font-size: clamp(1.95rem, 1.2rem + 2.4vw, 3.125rem);   /* 31px → 50px */
  line-height: 1.1;
}
h2 { font-size: clamp(1.5rem, 1.2rem + .95vw, 1.75rem); }  /* 24px → 28px */
h3 { font-size: 1.375rem; }
h4 { font-size: 1.375rem; }                                 /* footer column headings */

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

/* Block prose is the lighter grey the Elementor text editors used; body text
   (chrome, lists outside blocks) stays on the darker --text. */
.olivetreeimprovements-prose { color: var(--olivetreeimprovements-text-muted); }
.olivetreeimprovements-prose :is(p, li) { color: inherit; }
.olivetreeimprovements-prose :is(h2, h3, h4) { color: var(--olivetreeimprovements-brand); }
.olivetreeimprovements-prose ul { padding-left: 1.2em; margin: 0 0 1.15em; }
.olivetreeimprovements-prose li { margin-bottom: .5em; }
/* :not(.btn) matters — this selector is (0,2,0) and would otherwise beat the
   button's own (0,1,0) colour, painting orange text on an orange button. */
.olivetreeimprovements-prose a:not(.olivetreeimprovements-btn) { color: var(--olivetreeimprovements-accent); }

/* Sections that sit on the subtle band rather than the page background. */
.olivetreeimprovements-section--band { background: var(--olivetreeimprovements-band-bg); }

/* --------------------------------------------------------------------------
   Shared layout primitives — used by chrome AND blocks.
   -------------------------------------------------------------------------- */

.olivetreeimprovements-wrap {
  width: 100%;
  max-width: var(--olivetreeimprovements-content-max);
  margin-inline: auto;
  padding-inline: var(--olivetreeimprovements-gutter);
}

.olivetreeimprovements-section { padding-block: var(--olivetreeimprovements-section-y); }

.olivetreeimprovements-section__head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.olivetreeimprovements-section__head--center { margin-inline: auto; text-align: center; }

.olivetreeimprovements-eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--olivetreeimprovements-accent);
  margin-bottom: .75em;
}

.olivetreeimprovements-lede { font-size: 1.1rem; color: var(--olivetreeimprovements-text-muted); }

/* Buttons.
   The default is the orange accent at 15px Roboto with 12px/24px padding —
   that is what the Elementor button widget resolved to across the site.
   --lg is the hero/CTA size (Montserrat 20px); --green is the fill the
   Landscaping and Contact pages use. */
.olivetreeimprovements-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--olivetreeimprovements-radius);
  background: var(--olivetreeimprovements-accent);
  color: var(--olivetreeimprovements-text-invert);
  font-family: var(--olivetreeimprovements-font);
  font-weight: 500;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background .25s var(--olivetreeimprovements-ease), transform .25s var(--olivetreeimprovements-ease);
}
.olivetreeimprovements-btn:hover { background: var(--olivetreeimprovements-accent-dark); transform: translateY(-1px); }
.olivetreeimprovements-btn:focus-visible { outline: 3px solid var(--olivetreeimprovements-brand); outline-offset: 2px; }

.olivetreeimprovements-btn--lg {
  font-family: var(--olivetreeimprovements-font-heading);
  font-size: 20px;
}

.olivetreeimprovements-btn--green { background: var(--olivetreeimprovements-brand); }
.olivetreeimprovements-btn--green:hover { background: var(--olivetreeimprovements-brand-dark); }

.olivetreeimprovements-btn--whatsapp { background: var(--olivetreeimprovements-whatsapp); }
.olivetreeimprovements-btn--whatsapp:hover { background: #4bb85a; }

.olivetreeimprovements-btn--ghost {
  background: transparent;
  color: var(--olivetreeimprovements-text);
  border-color: var(--olivetreeimprovements-border);
}
.olivetreeimprovements-btn--ghost:hover { background: var(--olivetreeimprovements-card-bg); }

/* Cards — the ONLY place --olivetreeimprovements-card-bg should appear. */
.olivetreeimprovements-card {
  background: var(--olivetreeimprovements-card-bg);
  border: 1px solid var(--olivetreeimprovements-border);
  border-radius: var(--olivetreeimprovements-radius);
  padding: clamp(20px, 2.5vw, 32px);
}

/* Screen-reader only */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* WP core alignment classes */
.alignfull { width: 100vw; max-width: 100vw; margin-inline: calc(50% - 50vw); }
.alignwide { max-width: calc(var(--olivetreeimprovements-content-max) + 160px); margin-inline: auto; }
.aligncenter { margin-inline: auto; }
