/* ==========================================================================
   England Mail - company site stylesheet
   Heritage British palette: British racing green, deep claret, cream, navy ink.
   Old-style serif headings (Libre Baskerville) + clean sans body (Source Sans 3).
   Fonts load from Google Fonts with system fallbacks; no other external assets.
   ========================================================================== */

:root {
  --bg: #f6f1e3;          /* cream */
  --bg-2: #efe8d6;        /* deeper cream */
  --surface: #fffdf8;     /* warm white */
  --ink: #1b2436;         /* navy ink */
  --muted: #55606f;       /* slate */
  --border: #e0d8c4;      /* cream border */
  --green: #014029;       /* British racing green */
  --green-2: #012e1d;
  --green-soft: #e3ede7;
  --claret: #6a1f2b;      /* deep claret */
  --claret-2: #55121d;
  --claret-soft: #f3e5e7;
  --shadow: 0 1px 2px rgba(27,36,54,.05), 0 12px 30px rgba(27,36,54,.08);
  --shadow-sm: 0 1px 2px rgba(27,36,54,.06);
  --radius: 12px;
  --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--green-2); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: var(--claret); }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.15; letter-spacing: -0.01em; font-weight: 700; margin: 0 0 .5rem; }
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: 760px; }

/* skip link for keyboard users */
.skip { position: absolute; left: -999px; top: 0; background: var(--green); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0; z-index: 100; }
.skip:focus { left: 0; }

/* focus visibility */
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--claret); outline-offset: 2px; border-radius: 4px;
}

.eyebrow {
  text-transform: uppercase; letter-spacing: .16em; font-size: .8rem; font-weight: 700;
  color: var(--claret); margin: 0 0 .75rem;
}

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .7rem 1.3rem; border-radius: 9px; border: 1.5px solid transparent;
  font-family: var(--sans); font-weight: 600; font-size: 1rem; cursor: pointer;
  text-decoration: none; transition: background .14s ease, border-color .14s ease, transform .02s ease, color .14s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-2); color: #fff; }
.btn-ghost { background: transparent; color: var(--green-2); border-color: var(--green); }
.btn-ghost:hover { background: var(--green-soft); color: var(--green-2); }
.btn-lg { padding: .85rem 1.6rem; font-size: 1.08rem; }

/* ---- crest / brand ---- */
.crest-svg .shield { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.crest-svg .env, .crest-svg .flap { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--green-2); }
.brand:hover { color: var(--green-2); }
.brand .crest-svg { width: 30px; height: 30px; flex: none; }
.brand .wordmark { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; letter-spacing: .01em; }

/* ---- header ---- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 0 var(--green-soft);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .9rem; padding-bottom: .9rem; }
.nav-main { display: flex; align-items: center; gap: 1.5rem; }
.nav-main a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .98rem; }
.nav-main a:hover { color: var(--claret); }
.nav-cta { display: flex; align-items: center; gap: .75rem; }
.nav-cta a.signin { color: var(--green-2); text-decoration: none; font-weight: 600; }
.nav-cta a.signin:hover { color: var(--claret); }
.nav-toggle { display: none; }

/* ---- hero ---- */
.hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.hero h1 { margin-bottom: 1rem; }
.hero .lede { font-size: 1.25rem; color: var(--muted); max-width: 44ch; margin-bottom: 1.75rem; }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-note { margin-top: 1.1rem; color: var(--muted); font-size: .95rem; }

/* the crest showpiece in the hero */
.crest-panel {
  background: var(--green);
  color: var(--bg);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center;
  border: 1px solid var(--green-2);
}
.crest-panel .crest-svg { width: 128px; height: 128px; color: var(--bg); }
.crest-panel .motto { font-family: var(--serif); font-style: italic; font-size: 1.25rem; }
.crest-panel .estd { text-transform: uppercase; letter-spacing: .2em; font-size: .72rem; opacity: .85; }
.crest-panel .rule { width: 48px; height: 2px; background: var(--claret-soft); opacity: .6; }

/* ---- generic sections ---- */
section.band { padding: clamp(2.5rem, 5vw, 4rem) 0; }
section.band.alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 2rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* card grids */
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm); border-top: 3px solid var(--green);
}
.card.claret-top { border-top-color: var(--claret); }
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.card .ico {
  width: 42px; height: 42px; border-radius: 10px; background: var(--green-soft); color: var(--green-2);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: .9rem;
}
.card .ico svg { width: 22px; height: 22px; }

/* principles / list rows */
.rows { display: grid; gap: 1rem; }
.row {
  display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.4rem;
}
.row .tick { color: var(--green); flex: none; margin-top: .15rem; }
.row .tick svg { width: 22px; height: 22px; }
.row h3 { font-size: 1.1rem; margin-bottom: .2rem; }
.row p { margin: 0; color: var(--muted); }

/* pledge / quote panel (our own words, not a testimonial) */
.pledge {
  background: var(--green); color: var(--bg); border-radius: 16px; padding: clamp(2rem, 4vw, 3rem);
  box-shadow: var(--shadow); border: 1px solid var(--green-2);
}
.pledge .eyebrow { color: var(--claret-soft); }
.pledge h2 { color: #fff; }
.pledge p { color: #eef3ef; }
.pledge a { color: #fff; }

/* closing CTA */
.cta-final { text-align: center; }
.cta-final .btn-ghost { border-color: #fff; color: #fff; }
.cta-final .btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ---- pricing ---- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; align-items: stretch; }
.plan {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.75rem; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
}
.plan.featured { border: 2px solid var(--green); box-shadow: var(--shadow); position: relative; }
.plan .flag { position: absolute; top: -.8rem; right: 1.25rem; background: var(--claret); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .25rem .6rem; border-radius: 999px; }
.plan h3 { font-size: 1.3rem; }
.plan .price { font-family: var(--serif); font-size: 2.4rem; color: var(--green-2); margin: .4rem 0 .1rem; }
.plan .price span { font-family: var(--sans); font-size: .95rem; color: var(--muted); font-weight: 400; }
.plan .plan-sub { color: var(--muted); margin-bottom: 1.1rem; }
.plan ul { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .6rem; }
.plan li { display: grid; grid-template-columns: auto 1fr; gap: .55rem; align-items: start; }
.plan li svg { width: 18px; height: 18px; color: var(--green); flex: none; margin-top: .2rem; }
.plan .btn { margin-top: auto; }

/* ---- legal / prose ---- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2.25rem; }
.prose h3 { margin-top: 1.5rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.prose .updated { color: var(--muted); font-size: .95rem; margin-bottom: 2rem; }
.callout {
  background: var(--green-soft); border: 1px solid #c7ddd1; border-left: 4px solid var(--green);
  border-radius: 10px; padding: 1rem 1.2rem; margin: 1.5rem 0;
}

/* ---- page title header ---- */
.page-head { padding: clamp(2.5rem, 5vw, 4rem) 0 1.5rem; }
.page-head .eyebrow { margin-bottom: .5rem; }

/* ---- contact ---- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.contact-card a { font-weight: 600; }

/* ---- footer ---- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -2px 0 var(--green-soft); margin-top: 1rem; }
.site-footer .wrap { padding-top: 3rem; padding-bottom: 2.5rem; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.footer-brand .brand { margin-bottom: .75rem; }
.footer-brand p { color: var(--muted); font-size: .95rem; max-width: 30ch; }
.footer-col h4 { font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .8rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer-col a { color: var(--ink); text-decoration: none; font-size: .96rem; }
.footer-col a:hover { color: var(--claret); }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.footer-bottom .disclaimer { max-width: 60ch; }

/* ---- responsive ---- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .crest-panel { order: -1; }
  .grid-3, .price-grid { grid-template-columns: 1fr; }
  .grid-2, .contact-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .nav-main { display: none; }
  .nav-main.open { display: flex; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); flex-direction: column; align-items: flex-start; gap: 0; padding: .5rem 1.5rem 1rem; border-bottom: 1px solid var(--border); }
  .nav-main.open a { padding: .6rem 0; width: 100%; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; background: transparent; border: 1.5px solid var(--border); border-radius: 9px; cursor: pointer; color: var(--ink); }
  .site-header .wrap { position: relative; flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; }
  .nav-cta .btn { padding: .55rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
