/* ==========================================================================
   England Analytics — site.css
   All brand colors live in the :root block below. Change them here once and
   the whole site follows. Values sampled directly from the logo file.
   ========================================================================== */

:root {
  /* --- Brand (from logo) --- */
  --green:        #123d2b;  /* logo background */
  --green-deep:   #0c2a1d;  /* darker step: hovers, footer */
  --green-mid:    #1d5239;  /* borders/rules on dark */
  --green-tint:   #e8efe9;  /* pale surface */
  --green-tint-2: #f2f6f2;  /* palest surface */

  --gold:         #c49f50;  /* logo bar, mid tone */
  --gold-deep:    #b99342;  /* logo bar, dark end */
  --gold-light:   #e6c979;  /* logo bar, light end */
  --sand:         #d5c299;  /* "ANALYTICS" wordmark color */

  /* --- Neutrals --- */
  --ink:          #14231c;  /* body text: green-black, not pure black */
  --muted:        #5a6a60;  /* secondary text */
  --paper:        #fcfcfa;  /* page background */
  --white:        #ffffff;
  --border:       #d9e0d8;
  --border-soft:  #e8ece7;

  /* --- Type --- */
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --t-xs:  0.8125rem;
  --t-sm:  0.9375rem;
  --t-bd:  1.0625rem;
  --t-md:  1.25rem;
  --t-lg:  1.5rem;
  --t-xl:  clamp(1.75rem, 1.2rem + 1.8vw, 2.25rem);
  --t-2xl: clamp(2.125rem, 1.4rem + 2.6vw, 2.875rem);
  --t-3xl: clamp(2.5rem, 1.5rem + 3.8vw, 3.75rem);

  /* --- Layout --- */
  --wrap: 1140px;
  --gap: 1.5rem;
  --radius: 4px;
}

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--t-bd);
  line-height: 1.65;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration-color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--green-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  color: var(--green-deep);
  text-wrap: balance;
}
h1 { font-size: var(--t-3xl); }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-lg); letter-spacing: -0.01em; }
h4 { font-size: var(--t-bd); letter-spacing: 0; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 600; }

/* --- Layout helpers ------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.prose { max-width: 62ch; }
.prose-wide { max-width: 72ch; }
.section { padding: 5rem 0; }
.section-tight { padding: 3.5rem 0; }
.tint { background: var(--green-tint-2); border-block: 1px solid var(--border-soft); }
.lede { font-size: var(--t-md); line-height: 1.55; color: var(--muted); }
.small { font-size: var(--t-sm); color: var(--muted); }
.stack > * + * { margin-top: 1rem; }
.center-narrow { max-width: 58ch; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--green); color: var(--white);
  padding: 0.75rem 1rem; font-family: var(--sans); font-size: var(--t-sm);
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* --- Section heading with gold rule -------------------------------------- */
.head { max-width: 62ch; }
.head::before {
  content: ""; display: block; width: 44px; height: 3px;
  background: var(--gold); margin-bottom: 1.5rem;
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: var(--t-sm); font-weight: 600;
  letter-spacing: 0.005em;
  padding: 0.8rem 1.4rem; border-radius: var(--radius);
  border: 1px solid var(--green); background: var(--green); color: var(--white);
  text-decoration: none; cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--green-deep); border-color: var(--green-deep); color: var(--white); }
.btn-gold { background: var(--gold-deep); border-color: var(--gold-deep); color: #241a06; }
.btn-gold:hover { background: var(--gold); border-color: var(--gold); color: #241a06; }
.btn-ghost { background: transparent; color: var(--green); }
.btn-ghost:hover { background: var(--green-tint); color: var(--green-deep); border-color: var(--green); }
.btn-on-dark { background: transparent; border-color: var(--sand); color: var(--white); }
.btn-on-dark:hover { background: rgba(255,255,255,0.1); border-color: var(--white); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* --- Header --------------------------------------------------------------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 72px;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  text-decoration: none; color: var(--green-deep);
}
.brand svg { flex: none; }
.brand-name {
  font-family: var(--sans); font-weight: 700; font-size: 1.0625rem;
  letter-spacing: 0.06em; text-transform: uppercase; line-height: 1;
}
.brand-name span { display: block; font-size: 0.5625rem; font-weight: 600; letter-spacing: 0.22em; color: var(--gold-deep); margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 0.35rem; }
.nav a {
  font-family: var(--sans); font-size: var(--t-sm); font-weight: 500;
  color: var(--ink); text-decoration: none;
  padding: 0.5rem 0.7rem; border-radius: var(--radius);
}
.nav a:hover { background: var(--green-tint); color: var(--green-deep); }
.nav a[aria-current="page"] { color: var(--green-deep); box-shadow: inset 0 -2px 0 var(--gold); }
.nav a.btn { margin-left: 0.5rem; color: var(--white); }
.nav .btn:hover { background: var(--green-deep); }

.nav-toggle {
  display: none; font-family: var(--sans); font-size: var(--t-sm); font-weight: 600;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.55rem 0.8rem; color: var(--green-deep); cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.5rem 1.25rem;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 0.85rem 0; border-bottom: 1px solid var(--border-soft); border-radius: 0; }
  .nav a:hover { background: transparent; }
  .nav a[aria-current="page"] { box-shadow: none; color: var(--gold-deep); }
  .nav .btn { margin: 1rem 0 0; border-bottom: 0; }
  .header-inner { position: relative; }
}

/* --- Hero ----------------------------------------------------------------- */
.hero { background: var(--green); color: var(--white); overflow: hidden; }
.hero-inner {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 3.5rem; align-items: center;
  padding: 5.5rem 0 5rem;
}
.hero h1 {
  color: var(--white); max-width: 26ch; margin-bottom: 1.5rem;
  font-size: clamp(2rem, 1.15rem + 2.7vw, 3rem);
}
.hero p { color: #dbe6dd; max-width: 48ch; font-size: var(--t-md); line-height: 1.55; }
.hero-eyebrow {
  font-family: var(--sans); font-size: var(--t-sm); font-weight: 500;
  color: var(--sand); margin-bottom: 1.25rem;
}
.hero .btn-row { margin-top: 2.25rem; }

/* Bar motif — echoes the logo mark */
.bars { display: flex; align-items: flex-end; gap: 12px; height: 230px; max-width: 360px; }
.bars i {
  display: block; flex: 1; border-radius: 1px 1px 0 0;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
  transform-origin: bottom;
}
.bars i:nth-child(1) { height: 34%; }
.bars i:nth-child(2) { height: 48%; }
.bars i:nth-child(3) { height: 63%; }
.bars i:nth-child(4) { height: 81%; }
.bars i:nth-child(5) { height: 100%; }
.bars-base { height: 1px; background: rgba(255,255,255,0.8); max-width: 420px; }
.hero-figure figcaption { font-family: var(--sans); font-size: var(--t-xs); color: var(--sand); margin-top: 0.9rem; }

@media (prefers-reduced-motion: no-preference) {
  .bars i { animation: grow 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .bars i:nth-child(1) { animation-delay: 0.05s; }
  .bars i:nth-child(2) { animation-delay: 0.14s; }
  .bars i:nth-child(3) { animation-delay: 0.23s; }
  .bars i:nth-child(4) { animation-delay: 0.32s; }
  .bars i:nth-child(5) { animation-delay: 0.41s; }
  @keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; padding: 3.5rem 0 3rem; }
  .bars { height: 150px; }
}

/* --- Page header (non-home) ---------------------------------------------- */
.page-head { background: var(--green); color: var(--white); padding: 4rem 0 3.5rem; }
.page-head h1 { color: var(--white); margin-bottom: 1rem; font-size: var(--t-2xl); }
.page-head p { color: #dbe6dd; max-width: 58ch; font-size: var(--t-md); line-height: 1.55; }
.page-head::after {
  content: ""; display: block; width: 44px; height: 3px;
  background: var(--gold); margin-top: 2rem;
}

/* --- Cards ---------------------------------------------------------------- */
.grid { display: grid; gap: var(--gap); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem;
  display: flex; flex-direction: column;
}
.card h3 { margin-bottom: 0.5rem; }
.card p { font-size: var(--t-sm); color: var(--muted); }
.card .card-cta { margin-top: auto; padding-top: 1.5rem; }
.card-lead { border-top: 3px solid var(--gold); }
.card ul { margin: 0.75rem 0 0; padding-left: 1.1rem; font-size: var(--t-sm); color: var(--muted); }
.card ul li { margin-bottom: 0.35rem; }

.who {
  font-family: var(--sans); font-size: var(--t-xs); color: var(--green);
  background: var(--green-tint); border-radius: 2px;
  padding: 0.3rem 0.55rem; display: inline-block; margin-bottom: 1rem;
}

/* --- Price ---------------------------------------------------------------- */
.price {
  font-family: var(--sans); font-weight: 700; font-size: 1.75rem;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
  color: var(--green-deep); line-height: 1;
}
.price small { font-family: var(--sans); font-weight: 500; font-size: var(--t-xs); color: var(--muted); display: block; margin-top: 0.4rem; letter-spacing: 0; }

/* --- Product cards -------------------------------------------------------- */
.product {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden;
}
.product-preview {
  background: var(--green); border-bottom: 1px solid var(--border);
  display: block; width: 100%; height: auto;
}
.product-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.product-body :is(h2, h3) { font-size: var(--t-md); margin-bottom: 0.5rem; letter-spacing: -0.01em; }
.product-body :is(h2, h3) a { text-decoration: none; color: var(--green-deep); }
.product-body :is(h2, h3) a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.product-body p { font-size: var(--t-sm); color: var(--muted); }
.product-meta {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; margin-top: auto; padding-top: 1.5rem;
}
.product-list { margin: 1rem 0 0; padding-left: 1.1rem; font-size: var(--t-sm); color: var(--muted); }

.family-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: 2rem; }
.family-card { display: flex; flex-direction: column; overflow: hidden; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); }
.family-card > img { display: block; width: 100%; height: auto; border-bottom: 1px solid var(--border); }
.family-preview { display: grid; width: 100%; aspect-ratio: 16 / 9; place-items: center; padding: 1.5rem; border-bottom: 1px solid var(--border); background: var(--green-tint-2); color: var(--green-deep); font-family: var(--sans); text-align: center; }
.family-preview span { font-size: var(--t-sm); font-weight: 600; line-height: 1.8; }
.family-card-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 1.25rem; }
.family-status { margin-bottom: 0.5rem; color: var(--green); font-family: var(--sans); font-size: var(--t-xs); font-weight: 600; }
.family-card h3 { margin-bottom: 0.5rem; color: var(--green-deep); font-size: var(--t-md); }
.family-card-body > p:not(.family-status) { margin-bottom: 1rem; color: var(--muted); font-size: var(--t-sm); }
.family-link { margin-top: auto; font-family: var(--sans); font-size: var(--t-sm); font-weight: 600; }
.family-link--muted { color: var(--muted); font-weight: 500; }
@media (max-width: 900px) { .family-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .family-grid { grid-template-columns: 1fr; } }

.download-facts {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 1.2fr);
  align-items: center; gap: 1rem 2rem; margin-top: 2rem; padding: 1.25rem 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.download-facts p { margin: 0; }
.download-facts-title { font-family: var(--sans); font-weight: 600; color: var(--green-deep); }
.theme-swatches { display: flex; flex-wrap: wrap; gap: 0.85rem 1.1rem; list-style: none; margin: 0.65rem 0 0; padding: 0; }
.theme-swatches li { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--sans); font-size: var(--t-xs); }
.theme-dot { display: inline-block; flex: 0 0 0.9rem; width: 0.9rem; height: 0.9rem; border: 1px solid var(--border); border-radius: 50%; }
.theme-dot--sage { background: #0c654f; }
.theme-dot--ocean { background: #285a7d; }
.theme-dot--slate { background: #56616d; }
.theme-dot--sand { background: #8b6a51; }

/* --- Compare table -------------------------------------------------------- */
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
@media (max-width: 900px) { .compare { grid-template-columns: 1fr; } }
.compare-col { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; }
.compare-col dl { margin: 1.25rem 0 0; }
.compare-col dt { font-family: var(--sans); font-size: var(--t-xs); color: var(--muted); }
.compare-col dd { margin: 0.1rem 0 1rem; font-size: var(--t-sm); }
.compare-col dd:last-child { margin-bottom: 0; }

/* --- Numbered process (real sequence) ------------------------------------ */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li {
  counter-increment: s; position: relative;
  padding: 0 0 1.5rem 3.25rem; border-left: 1px solid var(--border); margin-left: 1rem;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  content: counter(s); position: absolute; left: -1rem; top: 0;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--green); color: var(--white);
  font-family: var(--sans); font-size: var(--t-sm); font-weight: 600;
  display: grid; place-items: center;
}
.steps h4 { margin-bottom: 0.25rem; }
.steps p { font-size: var(--t-sm); color: var(--muted); }

/* --- Dark band ------------------------------------------------------------ */
.band-dark { background: var(--green); color: var(--white); padding: 4.5rem 0; }
.band-dark h2 { color: var(--white); }
.band-dark p { color: #dbe6dd; }
.band-dark a { color: var(--gold-light); }
.band-dark a.btn-gold, .band-dark a.btn-gold:hover { color: #241a06; }
.band-dark .price { color: var(--gold-light); }

/* --- Placeholder blocks (portfolio, previews) ---------------------------- */
.placeholder {
  border: 1px dashed var(--border); border-radius: var(--radius);
  background: var(--green-tint-2); padding: 1.5rem;
}
.placeholder h3 { font-size: var(--t-bd); }
.placeholder p { font-size: var(--t-sm); color: var(--muted); }

/* --- Forms ---------------------------------------------------------------- */
.form-shell {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem;
}
@media (max-width: 600px) { .form-shell { padding: 1.25rem; } }
.field { margin-bottom: 1.25rem; }
.field label, .fieldset > legend {
  display: block; font-family: var(--sans); font-size: var(--t-sm); font-weight: 600;
  color: var(--green-deep); margin-bottom: 0.4rem; padding: 0;
}
.field .hint { font-family: var(--sans); font-size: var(--t-xs); color: var(--muted); font-weight: 400; margin-bottom: 0.45rem; }
input[type="text"], input[type="email"], select, textarea {
  width: 100%; font-family: var(--serif); font-size: var(--t-bd); color: var(--ink);
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.7rem 0.8rem;
}
select { font-family: var(--sans); font-size: var(--t-sm); }
textarea { min-height: 6.5rem; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--green); }
.fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; }
.choices { display: grid; gap: 0.6rem; }
.choice {
  display: flex; gap: 0.7rem; align-items: flex-start;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.85rem 1rem; background: var(--paper); cursor: pointer;
}
.choice:hover { border-color: var(--green); }
.choice input { margin-top: 0.3rem; accent-color: var(--green); flex: none; }
.choice span { font-family: var(--sans); font-size: var(--t-sm); font-weight: 500; }
.choice em { display: block; font-family: var(--serif); font-style: normal; font-size: var(--t-sm); font-weight: 400; color: var(--muted); }
.choice:has(input:checked) { border-color: var(--green); background: var(--green-tint); }
.branch[hidden] { display: none; }
.form-note { font-family: var(--sans); font-size: var(--t-xs); color: var(--muted); margin-top: 1rem; }
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .two-up { grid-template-columns: 1fr; } }

/* --- Contact detail ------------------------------------------------------- */
.contact-aside dt { font-family: var(--sans); font-size: var(--t-xs); color: var(--muted); }
.contact-aside dd { margin: 0.2rem 0 1.25rem; }
.layout-form { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.9fr); gap: 3rem; align-items: start; }
@media (max-width: 900px) { .layout-form { grid-template-columns: 1fr; gap: 2rem; } }

/* --- Footer --------------------------------------------------------------- */
.site-footer { background: var(--green-deep); color: #c6d4c9; padding: 3.5rem 0 2.5rem; font-size: var(--t-sm); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }
.site-footer h4 { color: var(--sand); font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.04em; margin-bottom: 0.9rem; }
.site-footer a { color: #e3ebe4; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; text-decoration-color: var(--gold); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--green-mid);
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; justify-content: space-between;
  font-size: var(--t-xs); color: #9fb3a4;
}
.site-footer .brand-name { color: var(--white); }

/* Sticky sidebar on wide screens (product + contact pages) */
@media (min-width: 901px) {
  .layout-form aside { position: sticky; top: 96px; }
}

/* --- Product detail: stacked screenshots ----------------------------------- */
.shot-block { margin-top: 2.5rem; }
.shot-block:first-child { margin-top: 1.5rem; }
.shot-block h3 { font-size: var(--t-bd); margin-bottom: 0.6rem; color: var(--green-deep); }
.shot-block img { width: 100%; border: 1px solid var(--border); border-radius: 4px; display: block; }
.theme-options { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 1rem 0 0.5rem; }
.theme-option {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem;
  padding: 0.5rem 0.8rem; border: 1px solid var(--border); border-radius: 3px;
  background: var(--white); color: var(--ink); font-family: var(--sans);
  font-size: var(--t-sm); cursor: pointer;
}
.theme-option:hover { border-color: var(--gold-deep); }
.theme-option[aria-pressed="true"] { border-color: var(--green); outline: 2px solid var(--green); outline-offset: 1px; }
.theme-option:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.theme-preview-status { margin: 0 0 0.75rem; }
.best-for { font-family: var(--sans); font-size: var(--t-sm); color: var(--sand); margin-top: 1rem; max-width: 58ch; }
.best-for strong { color: var(--white); font-weight: 600; }

@media (max-width: 600px) {
  .download-facts { grid-template-columns: 1fr; }
  .theme-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .theme-option { justify-content: flex-start; }
}
