/* =========================================================
   Webb AI — webbai.co.uk

   Colour scheme chosen for legibility and checked against
   WCAG 2.2. Every foreground/background pair used below is
   listed in README section 3 with its measured ratio; body
   and heading text clear AAA (7:1), UI borders and focus
   rings clear the 3:1 non-text rule (SC 1.4.11 / 2.4.11).

   Layout structure follows the Act_Two Personal Site:
   narrow max-w-4xl column, bordered cards, same nav shape.
   ========================================================= */

:root{
  /* Surfaces */
  --white:#ffffff;          /* page background                        */
  --surface:#f5f6f8;        /* cards, alternating sections            */
  --hero:#f3f1fb;           /* hero band — a hint of violet, not more */

  /* Lines */
  --border:#dfe2e8;         /* decorative hairlines                   */
  --border-input:#7c8494;   /* form controls — 3.76:1 on white        */

  /* Text — neutral, never coloured for body copy */
  --heading:#14161a;        /* 18.1:1 on white                        */
  --text:#3d434d;           /*  9.9:1 on white                        */
  --muted:#5e6572;          /*  5.9:1 on white, small print only      */

  /* Accent — violet, dark enough to pass as text and as a button */
  --accent:#6d28d9;         /*  7.1:1 on white                        */
  --accent-hover:#5b21b6;   /*  9.0:1 on white                        */
  --accent-soft:#ede9fe;    /* chips and highlights                   */

  --container:56rem;        /* max-w-4xl, as the reference site       */
  --measure:66ch;           /* comfortable line length for prose      */
  --radius-md:.375rem;
  --radius-lg:.5rem;
  --radius-xl:.75rem;
  --font:'Inter',-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}

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

html{scroll-behavior:smooth;scroll-padding-top:5rem;-webkit-text-size-adjust:100%}

body{
  margin:0;
  font-family:var(--font);
  background:var(--white);
  color:var(--text);
  font-size:1.0625rem;      /* 17px — a touch above browser default   */
  line-height:1.65;         /* SC 1.4.12 comfortable, not cramped     */
  -webkit-font-smoothing:antialiased;
}

/* Images and SVGs can never blow up, even if this file fails to load */
img,svg{max-width:100%;height:auto}

a{color:var(--accent)}
a:hover{color:var(--accent-hover)}

h1,h2,h3,h4{margin:0;font-weight:700;line-height:1.2;color:var(--heading);letter-spacing:-.015em}
p{margin:0}

.container{max-width:var(--container);margin-inline:auto;padding-inline:1rem}
@media (min-width:640px){.container{padding-inline:1.5rem}}
@media (min-width:1024px){.container{padding-inline:2rem}}

.skip-link{position:absolute;left:-9999px;top:0;z-index:60;background:var(--accent);color:var(--white);padding:.75rem 1.25rem}
.skip-link:focus{left:0}

/* Focus ring: 3px, offset, and 7:1 against every background it lands on */
:focus-visible{outline:3px solid var(--accent);outline-offset:2px;border-radius:2px}

/* ---------- Navigation ---------- */
.nav{background:var(--white);border-bottom:1px solid var(--border)}
.nav-inner{display:flex;justify-content:space-between;height:4rem}
.nav-brand{display:flex;align-items:center}
.nav-brand a{font-size:1.25rem;font-weight:700;color:var(--heading);text-decoration:none;letter-spacing:-.02em}
.nav-links{display:none;align-items:center;gap:1.75rem}
@media (min-width:768px){.nav-links{display:flex}}
.nav-links a{color:var(--text);text-decoration:none;font-size:.9375rem;transition:color .15s}
.nav-links a:hover{color:var(--accent)}
/* Active page marked by weight and an underline, not colour alone (SC 1.4.1) */
.nav-links a[aria-current="page"]{
  color:var(--accent);font-weight:600;
  text-decoration:underline;text-underline-offset:.4rem;text-decoration-thickness:2px;
}

.nav-toggle-wrap{display:flex;align-items:center}
@media (min-width:768px){.nav-toggle-wrap{display:none}}
.nav-toggle{background:none;border:0;padding:.25rem;color:var(--text);cursor:pointer;line-height:0}
.nav-toggle:hover{color:var(--accent)}
.nav-toggle svg{width:1.5rem;height:1.5rem;display:block}

.mobile-menu{display:none;background:var(--white);border-top:1px solid var(--border);padding:.5rem}
.mobile-menu.open{display:block}
@media (min-width:768px){.mobile-menu,.mobile-menu.open{display:none}}
.mobile-menu a{
  display:block;padding:.625rem .75rem;margin-bottom:.125rem;
  border-radius:var(--radius-md);color:var(--text);
  font-size:1rem;text-decoration:none;
}
.mobile-menu a:hover{background:var(--surface);color:var(--accent)}
.mobile-menu a[aria-current="page"]{background:var(--accent-soft);color:var(--accent-hover);font-weight:600}

/* ---------- Sections ---------- */
main{min-height:60vh}
.section{padding-block:4rem}
.section-alt{background:var(--surface);border-block:1px solid var(--border)}
.hero{background:var(--hero);border-bottom:1px solid var(--border);padding-block:4.5rem}
.hero .container{text-align:center}
.hero-sm{padding-block:3.5rem}

h1,.h1{font-size:2.25rem}
@media (min-width:768px){h1,.h1{font-size:3.25rem}}
.hero-sm h1{font-size:2rem}
@media (min-width:768px){.hero-sm h1{font-size:2.75rem}}
h2,.h2{font-size:1.75rem}
@media (min-width:768px){h2,.h2{font-size:2rem}}
h3,.h3{font-size:1.125rem;font-weight:600}

.hero h1{margin-bottom:1.25rem}
.hero .lede{font-size:1.1875rem;color:var(--text);max-width:44rem;margin:0 auto 2rem}
@media (min-width:768px){.hero .lede{font-size:1.3125rem}}

.section-title{margin-bottom:.75rem}
.section-intro{font-size:1.0625rem;color:var(--text);margin-bottom:2rem;max-width:var(--measure)}
.center{text-align:center}
.center .section-intro{margin-inline:auto}

/* ---------- Buttons ---------- */
.btn-row{display:flex;flex-direction:column;gap:.875rem;justify-content:center}
@media (min-width:640px){.btn-row{flex-direction:row}}
.btn-row.left{justify-content:flex-start}

.btn{
  display:inline-block;text-align:center;text-decoration:none;
  padding:.75rem 1.75rem;border-radius:var(--radius-lg);
  font-weight:600;font-size:1rem;border:1px solid transparent;cursor:pointer;
  transition:background-color .15s,color .15s,border-color .15s;
}
.btn-primary{background:var(--accent);color:var(--white)}
.btn-primary:hover{background:var(--accent-hover);color:var(--white)}
.btn-secondary{background:var(--white);color:var(--accent);border-color:var(--accent)}
.btn-secondary:hover{background:var(--accent-soft);color:var(--accent-hover)}
.btn-plain{background:var(--surface);color:var(--heading);border-color:var(--border)}
.btn-plain:hover{background:var(--white);border-color:var(--border-input);color:var(--heading)}
.btn-full{display:block;width:100%}

/* Links carry an underline so they don't rely on colour alone */
.arrow-link{
  color:var(--accent);font-weight:600;font-size:.9375rem;
  text-decoration:underline;text-underline-offset:.2rem;
}
.arrow-link:hover{color:var(--accent-hover)}

/* ---------- Cards ---------- */
.grid{display:grid;gap:1.5rem}
@media (min-width:768px){
  .grid-2{grid-template-columns:repeat(2,1fr)}
  .grid-3{grid-template-columns:repeat(3,1fr)}
}

.card{
  background:var(--white);border:1px solid var(--border);
  border-radius:var(--radius-xl);padding:1.5rem;
  display:flex;flex-direction:column;
}
.card h3{margin-bottom:.625rem}
.card p{color:var(--text);margin-bottom:1rem}
.card p:last-child{margin-bottom:0}
.card .arrow-link{margin-top:auto}
.card-plain{background:var(--surface);border-color:var(--border)}

/* ---------- Lists ---------- */
.list{list-style:none;margin:0 0 1rem;padding:0;color:var(--text);max-width:var(--measure)}
.list li{position:relative;padding-left:1.375rem;margin-bottom:.5rem}
.list li::before{content:"";position:absolute;left:0;top:.7em;width:.5rem;height:.5rem;border-radius:50%;background:var(--accent)}
.list li:last-child{margin-bottom:0}
.card .list{max-width:none}

.prose{color:var(--text)}
.prose > p,.prose > ul{max-width:var(--measure)}
.prose h2{margin:2.75rem 0 .875rem}
.prose h2:first-child{margin-top:0}
.prose h3{margin:1.75rem 0 .5rem}
.prose p{margin-bottom:1rem}
.prose ul{padding-left:1.25rem;margin:0 0 1rem}
.prose li{margin-bottom:.5rem}
.prose strong{color:var(--heading);font-weight:600}

.note{font-size:.9375rem;color:var(--muted);max-width:var(--measure)}

/* ---------- Numbered steps ---------- */
.steps{list-style:none;margin:0;padding:0;display:grid;gap:1.5rem}
@media (min-width:768px){.steps{grid-template-columns:repeat(2,1fr)}}
.step{background:var(--white);border:1px solid var(--border);border-radius:var(--radius-xl);padding:1.5rem}
.step-label{
  display:inline-block;font-size:.75rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  color:var(--accent-hover);background:var(--accent-soft);
  padding:.2rem .55rem;border-radius:9999px;margin-bottom:.75rem;
}
.step h3{margin-bottom:.5rem}
.step p{color:var(--text)}

/* ---------- Pricing ---------- */
.price-card{position:relative}
.price-card.featured{border-color:var(--accent);border-width:2px}
.badge{
  display:inline-block;background:var(--accent-soft);color:var(--accent-hover);
  font-size:.75rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;
  padding:.2rem .6rem;border-radius:9999px;margin-bottom:.75rem;
}
.price{font-size:2rem;font-weight:700;color:var(--heading);margin:.25rem 0;letter-spacing:-.02em}
.price .from{font-size:.875rem;font-weight:500;color:var(--muted)}
.price .per{font-size:1rem;font-weight:500;color:var(--muted)}
.price-term{font-size:.875rem;color:var(--muted);margin-bottom:1rem}

/* ---------- FAQ ---------- */
.faq{display:grid;gap:.75rem;max-width:var(--measure)}
.faq details{background:var(--white);border:1px solid var(--border);border-radius:var(--radius-xl);padding:0 1.25rem}
.faq details[open]{border-color:var(--border-input)}
.faq summary{
  cursor:pointer;list-style:none;font-weight:600;color:var(--heading);
  padding:1.125rem 2rem 1.125rem 0;position:relative;
}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";position:absolute;right:0;top:1rem;font-size:1.25rem;font-weight:400;color:var(--accent)}
.faq details[open] summary::after{content:"–"}
.faq details p{color:var(--text);padding-bottom:1.25rem}

/* ---------- Forms ---------- */
.form-grid{display:grid;gap:2rem}
@media (min-width:768px){.form-grid{grid-template-columns:3fr 2fr}}
.field{margin-bottom:1.25rem}
.field label{display:block;font-size:.9375rem;font-weight:600;color:var(--heading);margin-bottom:.375rem}
.field input,.field select,.field textarea{
  width:100%;font-family:inherit;font-size:1rem;
  padding:.625rem .75rem;border-radius:var(--radius-md);
  background:var(--white);color:var(--text);
  border:1px solid var(--border-input);
}
.field textarea{min-height:9rem;resize:vertical}
.field input::placeholder,.field textarea::placeholder{color:var(--muted)}
.field input:focus,.field select:focus,.field textarea:focus{
  outline:3px solid var(--accent);outline-offset:1px;border-color:var(--accent);
}
.field.invalid input,.field.invalid select,.field.invalid textarea{border-color:#b91c1c;border-width:2px}
.field .error{display:none;font-size:.875rem;color:#b91c1c;margin-top:.375rem;font-weight:500}
.field.invalid .error{display:block}
.field-row{display:grid;gap:1.25rem}
@media (min-width:640px){.field-row{grid-template-columns:1fr 1fr}}

.checkbox{display:flex;gap:.625rem;align-items:flex-start}
.checkbox input{width:1.125rem;height:1.125rem;margin-top:.25rem;flex:none;accent-color:var(--accent)}
.checkbox label{margin:0;font-weight:400;font-size:.9375rem;color:var(--text)}
.checkbox-field.invalid .checkbox input{outline:2px solid #b91c1c;outline-offset:2px}
.hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

.form-status{display:none;margin-bottom:1.25rem;padding:1rem;border-radius:var(--radius-md);font-size:.9375rem}
.form-status.ok{display:block;background:#ecfdf5;border:1px solid #047857;color:#065f46}
.form-status.err{display:block;background:#fef2f2;border:1px solid #b91c1c;color:#991b1b}

/* ---------- Footer ---------- */
.footer{background:var(--surface);border-top:1px solid var(--border);margin-top:4rem}
.footer-inner{padding-block:2.5rem}
.footer-cols{display:grid;gap:2rem;margin-bottom:2rem}
@media (min-width:768px){.footer-cols{grid-template-columns:repeat(3,1fr)}}
.footer h4{font-size:.8125rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--heading);margin-bottom:.75rem}
.footer ul{list-style:none;margin:0;padding:0}
.footer li{margin-bottom:.5rem}
.footer a{color:var(--text);text-decoration:none;font-size:.9375rem}
.footer a:hover{color:var(--accent);text-decoration:underline}
.footer-bottom{
  display:flex;flex-direction:column;align-items:center;gap:.5rem;
  padding-top:1.5rem;border-top:1px solid var(--border);
  color:var(--muted);font-size:.875rem;text-align:center;
}
@media (min-width:768px){.footer-bottom{flex-direction:row;justify-content:space-between;text-align:left}}

/* ---------- Utilities ---------- */
.mb-0{margin-bottom:0}
.mt-2{margin-top:2rem}
.stack > * + *{margin-top:1.25rem}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.001ms !important;transition-duration:.001ms !important}
  html{scroll-behavior:auto}
}

@media print{
  .nav,.mobile-menu,.footer{display:none !important}
  body{background:#fff;color:#000}
  a{text-decoration:underline}
}
