/* Cranford Tech. Brand: True Blue #0070D7, black, white (Brand Guidelines v1.0, Oct 2023).
   Display: Azeret Mono, standing in for the brand's Silka Mono. Body: Inter (brand secondary). */

:root {
  --blue: #0070d7;
  --blue-deep: #0059ab;
  --blue-tint: #e3eefa;
  --ink: #000;
  --paper: #fff;
  --slate: #4a5563;
  --line: #cfdff2;

  --display: 'Azeret Mono', ui-monospace, monospace;
  --body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Type scale: 1.25 ratio on a 17px base */
  --step--1: 0.85rem;
  --step-0: 1.0625rem;
  --step-1: 1.33rem;
  --step-2: 1.66rem;
  --step-3: clamp(1.8rem, 1.3rem + 2vw, 2.6rem);
  --step-4: clamp(2.3rem, 1.4rem + 4vw, 4.4rem);

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
.on-blue :focus-visible, .on-ink :focus-visible { outline-color: var(--paper); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: 62ch; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; }
h1 { font-size: var(--step-4); font-weight: 800; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.02em; line-height: 1.25; }
p + p { margin-top: 1em; }
.lede { font-size: var(--step-1); line-height: 1.45; }

/* Buttons: pill shape echoes the rounded caps of the logo strokes */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 var(--step-0)/1 var(--body);
  padding: 0.95em 1.5em; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-blue { background: var(--blue); color: var(--paper); }
.btn-blue:hover { background: var(--blue-deep); }
.btn-white { background: var(--paper); color: var(--blue); }
.btn-white:hover { background: var(--blue-tint); }
.btn-ghost { border-color: currentColor; color: inherit; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 2rem; }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 5; }
/* Hide the sub-pixel seam where the blue header meets the blue hero */
.site-header.on-blue { box-shadow: 0 1px 0 var(--blue); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.logo img { height: 44px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav > a, .nav summary { font-weight: 500; text-decoration: none; cursor: pointer; }
.nav > a:hover, .nav summary:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.nav > a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.nav details { position: relative; }
.nav summary { list-style: none; display: flex; align-items: center; gap: 6px; }
.nav summary::-webkit-details-marker { display: none; }
.nav summary::after { content: ''; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.nav details[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.menu {
  position: absolute; top: calc(100% + 14px); left: -20px; width: 300px;
  background: var(--paper); color: var(--ink); border-radius: var(--radius);
  box-shadow: 0 18px 40px -12px rgba(0, 40, 90, .35); padding: 8px;
}
.menu a { display: block; padding: 12px 14px; border-radius: 8px; text-decoration: none; }
.menu a:hover { background: var(--blue-tint); }
.menu strong { display: block; font-weight: 600; }
.menu span { display: block; font-size: var(--step--1); color: var(--slate); line-height: 1.4; margin-top: 2px; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px; background: none; border: 2px solid currentColor;
    color: inherit; font: 600 var(--step--1)/1 var(--body); padding: 10px 16px; border-radius: 999px; cursor: pointer;
  }
  .nav { display: none; }
  .site-header.open .nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; top: 84px; left: 0; right: 0; background: var(--paper); color: var(--ink);
    padding: 8px var(--gutter) 24px; box-shadow: 0 20px 30px -20px rgba(0,0,0,.4);
  }
  .site-header.open .nav > a, .site-header.open .nav summary { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .site-header.open .nav .btn { margin-top: 16px; border-bottom: 0; background: var(--blue); color: var(--paper); }
  .site-header.open .menu { position: static; width: auto; box-shadow: none; padding: 0 0 8px; }
}

/* ---------- Blue sections + the logo-stroke motif ---------- */
.on-blue { background: var(--blue); color: var(--paper); }
.on-blue .btn-ghost { color: var(--paper); }
.on-ink { background: var(--ink); color: var(--paper); }

.strokes { position: absolute; pointer-events: none; }
.strokes path { fill: none; stroke: #fff; stroke-opacity: .13; stroke-linecap: round; stroke-linejoin: round; }

.hero { position: relative; overflow: hidden; }
.hero .wrap { position: relative; z-index: 1; padding-top: clamp(48px, 9vw, 120px); padding-bottom: clamp(56px, 9vw, 120px); }
.hero h1 { max-width: 15ch; }
.hero .lede { margin-top: 1.5rem; max-width: 34ch; }
.proof { margin-top: 2.5rem; max-width: 40ch; font-size: var(--step-0); color: rgba(255,255,255,.88); }
.proof strong { color: var(--paper); font-weight: 700; }
.hero .strokes { right: -8vw; top: -40px; width: min(62vw, 760px); height: auto; }

/* One orchestrated moment: the strokes draw in once on the home page */
.hero-home .strokes path { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 1.6s cubic-bezier(.6,0,.2,1) forwards; }
.hero-home .strokes path:nth-child(2) { animation-delay: .18s; }
.hero-home .strokes path:nth-child(3) { animation-delay: .36s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .hero-home .strokes path { animation: none; stroke-dashoffset: 0; }
}

.page-head .wrap { padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(48px, 7vw, 88px); }
.page-head h1 { font-size: var(--step-4); max-width: 16ch; }
.page-head .lede { margin-top: 1.25rem; max-width: 46ch; }
.page-head .strokes { right: -120px; top: -30px; width: min(48vw, 560px); }

@media (max-width: 700px) {
  .hero .strokes, .page-head .strokes { width: 150vw; right: -75vw; top: auto; bottom: -40px; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 112px) 0; }
.section.tint { background: var(--blue-tint); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { color: var(--slate); max-width: 52ch; margin-top: .75rem; }
.on-ink .section-head p { color: rgba(255,255,255,.72); }
.text-link { font-weight: 600; color: var(--blue); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.text-link:hover { color: var(--blue-deep); }

/* Catalogue: plugins and templates as a scannable list, not a card grid */
.catalogue { list-style: none; border-top: 2px solid var(--ink); }
.catalogue li { border-bottom: 1px solid var(--line); }
.catalogue a {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr) auto; gap: 8px 32px; align-items: baseline;
  padding: 22px 12px; text-decoration: none; transition: background-color .15s;
}
.catalogue a:hover { background: var(--blue-tint); }
.catalogue h3 { font-size: var(--step-1); }
.catalogue p { color: var(--slate); }
.catalogue .go { font-weight: 600; color: var(--blue); white-space: nowrap; }
.catalogue a:hover .go { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
@media (max-width: 760px) {
  .catalogue a { grid-template-columns: 1fr; padding: 20px 4px; }
}

/* Reviews */
.reviews { columns: 3 300px; column-gap: 24px; }
.review {
  break-inside: avoid; margin-bottom: 24px; padding: 26px 26px 22px;
  border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius);
}
.review blockquote { font-size: var(--step-0); line-height: 1.55; }
.review svg { width: 30px; height: 22px; margin-bottom: 14px; }
.more-reviews summary {
  list-style: none; cursor: pointer; display: inline-flex; margin-top: 8px;
}
.more-reviews summary::-webkit-details-marker { display: none; }
.more-reviews[open] summary { display: none; }
.more-reviews .reviews { margin-top: 0; }

/* Services list on the home page */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.services a { display: block; padding: 28px 24px 32px 0; text-decoration: none; border-right: 1px solid var(--line); }
.services a + a { padding-left: 24px; }
.services a:last-child { border-right: 0; }
.services h3 { margin-bottom: .6rem; }
.services p { color: var(--slate); }
.services a:hover h3 { color: var(--blue); }
@media (max-width: 760px) {
  .services { grid-template-columns: 1fr; }
  .services a, .services a + a { padding: 24px 0; border-right: 0; border-bottom: 1px solid var(--line); }
}

/* Feature rows on service pages */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
.feature { padding: 28px 0; border-top: 1px solid var(--line); }
.feature h3 { margin-bottom: .5rem; }
.feature p { color: var(--slate); max-width: 46ch; }
@media (max-width: 760px) { .features { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.split h2 { max-width: 14ch; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* FAQ */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px;
  padding: 22px 0; font-weight: 600; font-size: var(--step-1); line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 500 1.6rem/1 var(--display); color: var(--blue); }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { padding: 0 0 24px; color: var(--slate); max-width: 62ch; }

/* Closing call to action */
.cta { position: relative; overflow: hidden; }
.cta .wrap { position: relative; z-index: 1; padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(56px, 8vw, 104px); }
.cta h2 { max-width: 18ch; }
.cta p { margin-top: 1rem; max-width: 48ch; }
.cta .strokes { right: -60px; bottom: -120px; width: min(44vw, 520px); }

/* ---------- Forms ---------- */
.form-layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.form-aside h2 { font-size: var(--step-2); margin-bottom: 1rem; }
.form-aside p { color: var(--slate); }
.form-aside p + p { margin-top: 1rem; }
.form-aside a { color: var(--blue); font-weight: 600; }
@media (max-width: 860px) { .form-layout { grid-template-columns: 1fr; } }

.panel { background: var(--paper); border-radius: 14px; padding: clamp(24px, 4vw, 44px); box-shadow: 0 1px 0 var(--line), 0 24px 48px -28px rgba(0, 60, 120, .35); }
.field { margin-bottom: 22px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
label, .label { display: block; font-weight: 600; font-size: var(--step--1); margin-bottom: 8px; }
.hint { font-weight: 400; color: var(--slate); }
input[type="text"], input[type="email"], select, textarea {
  width: 100%; font: 400 var(--step-0)/1.4 var(--body); color: var(--ink);
  background: var(--paper); border: 1.5px solid #b9c7d8; border-radius: 8px; padding: 13px 14px;
}
textarea { min-height: 170px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 22px) 55%, calc(100% - 16px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 112, 215, .25); }
.ct-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.cf-turnstile { margin: 4px 0 22px; min-height: 65px; }
.form-done, .form-fail { display: none; border-radius: 10px; padding: 18px 20px; }
.form-done { background: var(--blue-tint); }
.form-done h3 { margin-bottom: .4rem; }
.form-fail { background: #fdecec; color: #8a1c1c; margin-top: 18px; }
.btn[disabled] { opacity: .7; cursor: progress; }

/* ---------- Prose (legal pages) ---------- */
.prose { max-width: 70ch; }
.prose h2 { font-size: var(--step-1); margin: 2.4rem 0 .7rem; letter-spacing: -0.02em; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: #1e2630; }
.prose a { color: var(--blue); }
.prose .updated { color: var(--slate); margin-bottom: 2rem; }

/* ---------- Footer ---------- */
.site-footer { padding: 72px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px 32px; }
.footer-grid h2 { font: 600 var(--step--1)/1.3 var(--body); letter-spacing: 0; color: rgba(255,255,255,.6); margin-bottom: 14px; }
.footer-grid ul { list-style: none; }
.footer-grid li + li { margin-top: 8px; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-brand p { color: rgba(255,255,255,.72); max-width: 30ch; margin-top: 18px; font-size: var(--step--1); }
.footer-brand img { height: 40px; width: auto; }
.footer-base { margin-top: 64px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.18); font-size: var(--step--1); color: rgba(255,255,255,.6); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.on-ink .text-link, .on-blue .text-link { color: var(--paper); }
.on-ink .text-link:hover, .on-blue .text-link:hover { color: var(--blue-tint); }
