/* Flowstead: mobile-first styles */

:root {
  --teal: #0F4C5C;
  --teal-dark: #0A3843;
  --green: #3E8E7E;
  --green-tint: #E3EFEB;
  --cream: #FAF6EE;
  --cream-deep: #F1EADC;
  --white: #FFFFFF;
  --charcoal: #1E2A32;
  --muted: #4A5761;
  --error: #A3302A;

  --font-head: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-small: 8px;
  --gutter: 1.25rem;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--cream);
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  color: var(--teal);
  margin: 0 0 0.75rem;
}

h1 { font-size: clamp(2.25rem, 8vw, 3.75rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.625rem, 5vw, 2.25rem); }
h3 { font-size: 1.1875rem; }

p { margin: 0 0 1rem; }

a { color: var(--teal); text-underline-offset: 0.15em; }
a:hover { color: var(--teal-dark); }

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

/* Layout */

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.narrow { max-width: 760px; }

.section { padding: 4rem 0; }

/* Skip link */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--teal);
  color: var(--white);
  border-radius: var(--radius-small);
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
  color: var(--white);
  outline-color: var(--charcoal);
}

main:focus { outline: none; }

/* Buttons */

.btn {
  display: inline-block;
  padding: 0.9rem 1.5rem;
  background: var(--teal);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid var(--teal);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: var(--white);
}

.btn:disabled { opacity: 0.7; cursor: progress; }

.btn-small {
  padding: 0.55rem 1rem;
  font-size: 0.9375rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--cream);
  border-bottom: 1px solid var(--cream-deep);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.375rem;
  color: var(--teal);
  text-decoration: none;
}

/* Offset anchor targets for the sticky header */
[id] { scroll-margin-top: 5rem; }

/* Hero */

.hero { padding: 3.5rem 0 4rem; }

.hero-inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.lead {
  font-size: 1.1875rem;
  max-width: 36rem;
  margin-bottom: 1.75rem;
}

.hero-art {
  max-width: 260px;
  width: 100%;
  margin: 0 auto;
}

.flow-line {
  fill: none;
  stroke: var(--green);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 8 10;
}

.env { fill: var(--teal); }
.env-accent { fill: var(--green); }

.env-flap {
  fill: none;
  stroke: var(--white);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Problem */

.problem {
  background: var(--teal);
  color: var(--white);
}

.problem h2 { color: var(--white); }
.problem p { font-size: 1.1875rem; margin-bottom: 0; }

/* Services */

.cards {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--cream-deep);
  border-top: 5px solid var(--green);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
}

.card p { margin-bottom: 0; }

.note {
  margin: 1.5rem 0 0;
  color: var(--muted);
}

/* How it works */

.steps-section { background: var(--green-tint); }

.steps {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 2rem;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.25rem;
}

.steps p { margin-bottom: 0; }

/* FAQ */

.faq { background: var(--white); }

.faq h2 { margin-bottom: 1.5rem; }

details {
  border-bottom: 1px solid var(--cream-deep);
}

details:first-of-type { border-top: 1px solid var(--cream-deep); }

summary {
  position: relative;
  padding: 1.1rem 2.5rem 1.1rem 0;
  font-weight: 700;
  color: var(--teal);
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
}

details[open] summary::after { content: "\2212"; }

details p { padding-bottom: 0.5rem; }

/* Audit form */

.audit-form {
  margin-top: 2rem;
  background: var(--white);
  border: 1px solid var(--cream-deep);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.field { margin-bottom: 1.25rem; }

label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 700;
}

.req,
.opt {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.9375rem;
}

input,
textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font: inherit;
  color: var(--charcoal);
  background: var(--white);
  border: 1.5px solid #7A858D;
  border-radius: var(--radius-small);
}

input:focus-visible,
textarea:focus-visible {
  border-color: var(--teal);
  outline-offset: 1px;
}

textarea { resize: vertical; min-height: 7rem; }

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.audit-form .btn { width: 100%; }

.consent {
  margin: 0.9rem 0 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

.form-status:empty { display: none; }

.form-status {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-small);
  font-weight: 500;
}

.form-status.is-success {
  background: var(--green-tint);
  color: var(--teal-dark);
  border: 1px solid var(--green);
}

.form-status.is-error {
  background: #FBECEA;
  color: var(--error);
  border: 1px solid var(--error);
}

/* Footer */

.site-footer {
  background: var(--charcoal);
  color: #E6E9EB;
  padding: 2.5rem 0;
  font-size: 0.9375rem;
}

.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--cream-deep); }
.site-footer :focus-visible { outline-color: var(--white); }

.footer-inner p { margin: 0 0 0.5rem; }

/* Privacy page */

.legal { padding: 3rem 0 4rem; }
.legal h2 { font-size: 1.375rem; margin-top: 2rem; }
.legal ul { padding-left: 1.25rem; margin: 0 0 1rem; }
.legal .updated { color: var(--muted); }

/* Tablet */

@media (min-width: 768px) {
  :root { --gutter: 2rem; }

  .section { padding: 5rem 0; }

  .hero { padding: 5rem 0; }

  .hero-inner { grid-template-columns: 1.3fr 1fr; }

  .hero-art { max-width: 360px; }

  .cards { grid-template-columns: repeat(3, 1fr); }

  .steps { grid-template-columns: repeat(3, 1fr); }

  .audit-form { padding: 2rem; }

  .audit-form .btn { width: auto; }

  .footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
  }
}

/* Desktop */

@media (min-width: 1024px) {
  .hero { padding: 6.5rem 0; }
  .hero-art { max-width: 420px; }
}

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