/* Colors were checked for WCAG AA contrast against the backgrounds they're used on. */
:root {
  --bg: #F7F8FA;
  --white: #FFFFFF;
  --tint: #EAF0FB;
  --ink: #14213D;
  --muted: #4A5568;
  --accent: #1D4ED8;
  --accent-dark: #1E3A8A;
  --line: #6B7280;
  --soft-line: #D5DEEE;
  --error: #B91C1C;
  --footer-text: #E2E8F0;
  --footer-link: #BFDBFE;
  --focus: #1D4ED8;
  --radius: 14px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

h1, h2, h3 { line-height: 1.2; color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin: .25em 0 .4em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); margin: 0 0 .5em; }
h3 { font-size: 1.2rem; margin: 0 0 .5em; }

a { color: var(--accent); text-underline-offset: .15em; }
a:hover { color: var(--accent-dark); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

address { font-style: normal; }

.container { width: min(1100px, 100% - 2.5rem); margin-inline: auto; }
.container.narrow { width: min(760px, 100% - 2.5rem); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--ink); color: var(--white); padding: .75rem 1rem; border-radius: 8px;
}
.skip-link:focus { top: 1rem; color: var(--white); }

/* Header */
.site-header { background: var(--bg); border-bottom: 1px solid var(--soft-line); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding: .85rem 0; }
.wordmark { font-size: 1.35rem; font-weight: 800; color: var(--ink); text-decoration: none; }
.nav-list { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.25rem; margin: 0; padding: 0; }
.nav-list a { display: inline-block; padding: .5rem 0; color: var(--ink); font-weight: 500; text-decoration: none; }
.nav-list a:hover { color: var(--accent); text-decoration: underline; }
.nav-list .nav-cta { background: var(--accent); color: var(--white); padding: .5rem 1.1rem; border-radius: 999px; }
.nav-list .nav-cta:hover { background: var(--accent-dark); color: var(--white); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .75rem 1.4rem; border: 2px solid var(--accent); border-radius: 999px;
  font: inherit; font-weight: 600; text-decoration: none; text-align: center; cursor: pointer;
  overflow-wrap: anywhere;
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--white); }
.btn-primary:disabled { opacity: .75; cursor: wait; }
.btn-secondary { background: transparent; color: var(--accent); }
.btn-secondary:hover { background: var(--white); color: var(--accent-dark); }
.button-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0; }

/* Hero */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0;
  background:
    radial-gradient(circle at 85% 15%, var(--tint) 0, transparent 45%),
    radial-gradient(circle at 5% 95%, #E3EAF8 0, transparent 40%),
    var(--bg);
}
.eyebrow { margin: 0; color: var(--accent); font-weight: 700; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; }
.lead { font-size: 1.2rem; max-width: 40rem; }

/* Sections */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-tint { background: var(--tint); }
.section-intro { color: var(--muted); margin-top: 0; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; margin: 1.5rem 0 0; }
.card { background: var(--white); border: 1px solid var(--soft-line); border-radius: var(--radius); padding: 1.5rem; }
.card p { margin: 0; }
.card .price { font-size: 1.4rem; font-weight: 800; margin-bottom: .5rem; }
/* Long email addresses wrap after the "@" (see the <wbr> in the HTML), and only break elsewhere as a last resort */
a[href^="mailto:"] { overflow-wrap: break-word; }
.small { font-size: .95rem; color: var(--muted); }

/* How it works */
.steps { margin: 0; padding-left: 1.4rem; }
.steps li { margin: 0 0 1rem; padding-left: .25rem; }
.steps li:last-child { margin-bottom: 0; }

/* Websites I've made */
.work-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.work-list:not(:has(li)) { display: none; }
.work-item { background: var(--white); border: 1px solid var(--soft-line); border-radius: var(--radius); padding: 1.5rem; }
.work-item p { margin: 0; color: var(--muted); }
.work-empty { background: var(--white); border: 1px dashed var(--line); border-radius: var(--radius); padding: 1.5rem; max-width: 40rem; margin: 1.5rem 0 0; }

/* About */
.details { margin: 1.5rem 0 0; background: var(--white); border: 1px solid var(--soft-line); border-radius: var(--radius); padding: .5rem 1.5rem; }
.details div { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--soft-line); }
.details div:last-child { border-bottom: 0; }
.details dt { font-weight: 700; }
.details dd { margin: 0; }

/* Form */
.request-form { background: var(--white); border: 1px solid var(--soft-line); border-radius: var(--radius); padding: clamp(1.25rem, 4vw, 2rem); }
.field { margin: 0 0 1.25rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; }
.hint { margin: 0 0 .4rem; font-size: .95rem; color: var(--muted); }
input[type="text"], input[type="email"] {
  width: 100%; min-height: 48px; padding: .7rem .85rem;
  font: inherit; color: var(--ink); background: var(--white);
  border: 2px solid var(--line); border-radius: 10px;
}
input.input-short { max-width: 8rem; }
.consent { display: flex; align-items: flex-start; gap: .75rem; }
.consent input { width: 1.35rem; height: 1.35rem; margin: .2rem 0 0; accent-color: var(--accent); flex: none; }
.field .consent-label { display: inline; font-weight: 400; }
[aria-invalid="true"] { border-color: var(--error) !important; }
.field-error { color: var(--error); font-weight: 600; margin: .35rem 0 0; }
.error-summary { background: var(--white); border: 2px solid var(--error); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.error-summary h3 { font-size: 1.1rem; color: var(--error); }
.error-summary a { color: var(--error); font-weight: 600; }
.form-status.has-message { margin-top: 1rem; padding: 1rem 1.25rem; border-left: 6px solid var(--accent); background: var(--tint); border-radius: 8px; font-weight: 600; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.site-footer { --focus: var(--footer-link); background: var(--ink); color: var(--footer-text); padding: 3rem 0 1.5rem; }
.site-footer a { color: var(--footer-link); }
.site-footer a:hover { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.footer-name { font-size: 1.3rem; font-weight: 800; margin: 0 0 .5rem; color: var(--white); }
.footer-title { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--footer-link); margin: 0 0 .5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: .35rem 0; }
.copyright { margin-top: 2rem; font-size: .9rem; }

/* Policy pages */
.legal { padding: 2.5rem 0 4rem; }
.legal h2 { font-size: 1.4rem; margin-top: 2rem; }
.legal .meta { color: var(--muted); }

@media (min-width: 700px) {
  .site-header { position: sticky; top: 0; z-index: 50; }
}

@media (max-width: 699px) {
  html { scroll-padding-top: 1rem; }
  .details div { grid-template-columns: 1fr; gap: .1rem; }
}

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