/* =========================================================
   Loop Web Co. styles
   Mobile-first: the base styles are for phones. The @media
   blocks near the bottom of each section add layout for
   bigger screens.
   ========================================================= */

/* ---------- 1. Colors and basics (edit colors here) ---------- */
:root {
  --navy: #14284b;        /* main brand color */
  --navy-dark: #0d1b33;   /* footer, dark text */
  --navy-soft: #eef2f8;   /* light tinted backgrounds */
  --orange: #e8772e;      /* warm accent: buttons, highlights */
  --orange-dark: #b9520f; /* orange that's dark enough for text on white */
  --white: #ffffff;
  --text: #1f2a3d;
  --muted: #5a6577;
  --line: #dde3ec;

  --radius: 10px;
  --shadow: 0 2px 10px rgba(13, 27, 51, 0.08);
  --max-width: 1120px;

  /* System fonts: already on every device, so nothing to download (fast!) */
  --font: 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: 72px; } /* stops the sticky header covering section titles */

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

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

h1, h2, h3 { line-height: 1.2; color: var(--navy); margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 6vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.25rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; }

a { color: var(--orange-dark); }
a:hover { color: var(--navy); }

/* Keyboard users see a clear outline when tabbing */
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

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

/* Hidden visually but still read by screen readers */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--white); padding: 0.5rem 1rem; }

/* ---------- 2. Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, transform 0.15s;
}
.btn-primary { background: var(--orange); color: var(--navy-dark); }
.btn-primary:hover { background: #f08a45; color: var(--navy-dark); transform: translateY(-1px); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.5); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); color: var(--white); }
.btn-outline { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }

/* ---------- 3. Logo ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--navy);
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.logo:hover { color: var(--navy); }
.logo svg { width: 34px; height: 34px; flex-shrink: 0; }
.logo strong { font-weight: 800; }
.logo span { font-weight: 500; }
/* --logo-gap = the background color behind the logo, so the track looks like it crosses over itself */
.logo--light { color: var(--white); --logo-gap: var(--navy-dark); }
.logo--light:hover { color: var(--white); }

/* ---------- 4. Header and navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 64px; }

/* Phone-only: small "Call" button next to the Menu button */
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.header-call {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.5rem 0.8rem; border-radius: 8px;
  background: var(--orange); color: var(--white);
  font-weight: 700; text-decoration: none; white-space: nowrap;
}
.header-call:hover { background: var(--orange-dark); color: var(--white); }
.header-call svg { width: 16px; height: 16px; flex-shrink: 0; }
/* Small phones: the Menu button shows just its three bars (the word stays for screen readers) */
@media (max-width: 419px) {
  .menu-toggle { padding: 0.55rem 0.65rem; }
  .menu-label {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
}
/* Very small phones (e.g. 320px wide): Call shows just the phone icon, logo a bit smaller */
@media (max-width: 359px) {
  .site-header .logo { font-size: 1.15rem; }
  .site-header .logo svg { width: 30px; height: 30px; }
  .header-call { padding: 0.55rem 0.65rem; }
  .call-label {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
}

.menu-toggle {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  padding: 0.5rem 0.75rem; font: inherit; font-weight: 600; color: var(--navy); cursor: pointer;
}
/* Call and Menu buttons share one fixed height so they line up (44px = comfortable tap size) */
.header-call, .menu-toggle {
  box-sizing: border-box; height: 44px;
  padding-top: 0; padding-bottom: 0; justify-content: center;
}
.header-call, .menu-toggle { min-width: 44px; }
.menu-toggle .bars, .menu-toggle .bars::before, .menu-toggle .bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; position: relative; content: "";
}
.menu-toggle .bars::before { position: absolute; top: -6px; }
.menu-toggle .bars::after  { position: absolute; top: 6px; }

/* Phone menu: hidden until the button is tapped (JavaScript adds .is-open) */
.site-nav {
  display: none;
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0.5rem 1.25rem 1.25rem; }
.site-nav a {
  display: block; padding: 0.75rem 0;
  color: var(--navy); text-decoration: none; font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.site-nav li:last-child a { border-bottom: 0; }
.site-nav .btn { margin-top: 0.75rem; text-align: center; }

@media (min-width: 900px) {
  .header-actions { display: none; } /* Call + Menu buttons are phone-only */
  .site-nav { display: block; position: static; border: 0; box-shadow: none; }
  .site-nav ul { display: flex; align-items: center; gap: 1.75rem; padding: 0; }
  .site-nav a { padding: 0; border: 0; font-size: 0.98rem; }
  .site-nav a:not(.btn):hover { color: var(--orange-dark); }
  .site-nav .btn { margin: 0; padding: 0.6rem 1.2rem; }
}

/* ---------- 5. Sections (shared) ---------- */
.section { padding: 4rem 0; }
.section--tint { background: var(--navy-soft); }
.section-intro { max-width: 640px; margin-bottom: 2.5rem; }
.section-intro p { color: var(--muted); font-size: 1.1rem; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--orange-dark);
  margin-bottom: 0.5rem;
}

@media (min-width: 900px) {
  .section { padding: 6rem 0; }
}

/* Subtle loop divider between some sections */
.loop-divider {
  display: flex; align-items: center; gap: 1rem;
  max-width: 220px; margin: 0 auto; color: var(--line);
}
.loop-divider::before, .loop-divider::after { content: ""; flex: 1; height: 1px; background: currentColor; }
.loop-divider svg { width: 26px; height: 26px; opacity: 0.8; }

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
  padding: 4rem 0 4.5rem;
}
.hero h1 { color: var(--white); max-width: 16ch; }
.hero .lead { font-size: 1.15rem; color: #d3dbe8; max-width: 38rem; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-note { margin-top: 1.5rem; font-size: 0.95rem; color: #aebbd0; }
.hero-art {
  position: absolute; right: -80px; bottom: -90px;
  width: 360px; height: 360px;
  opacity: 0.12; pointer-events: none;
}

@media (min-width: 900px) {
  .hero { padding: 7rem 0 7.5rem; }
  .hero-art { right: 4%; bottom: -60px; width: 440px; height: 440px; opacity: 0.16; }
}

/* ---------- 7. Cards (services, portfolio) ---------- */
.grid { display: grid; gap: 1.25rem; }
@media (min-width: 700px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: grid; place-items: center;
  background: #fdf0e6; color: var(--orange-dark);
  margin-bottom: 1rem;
}
.card-icon svg { width: 24px; height: 24px; }

.check-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.check-list li { position: relative; padding-left: 1.6rem; margin-bottom: 0.45rem; }
.check-list li::before {
  content: ""; position: absolute; left: 0.15rem; top: 0.45em;
  width: 0.45rem; height: 0.8rem;
  border: solid var(--orange); border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

/* ---------- 8. Pricing ---------- */
/* Small label above each pricing row ("Build Your Site", "Keep It Running") */
.price-group {
  margin: 0 0 0.9rem; font-size: 0.85rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--orange-dark);
}

/* Build options: One-Page Starter (light) + Full Website (navy), side by side on wider screens */
.builds { display: grid; gap: 1.25rem; margin-bottom: 2.5rem; }
@media (min-width: 800px) { .builds { grid-template-columns: 1fr 1fr; } }
.price-build {
  display: flex; flex-direction: column;
  background: var(--navy); color: var(--white);
  border-radius: var(--radius); padding: 1.75rem;
}
.price-build h3 { color: var(--white); }
.price-build .price { color: var(--white); }
.build-desc { color: #d3dbe8; margin: 0.25rem 0 1rem; }
.price-build .check-list { margin: 0; flex: 1; }
.build-note {
  margin: 1.25rem 0 0; padding-top: 0.9rem; font-size: 0.92rem; font-weight: 600;
  border-top: 1px dashed var(--line);
}
/* Light version for the Starter card */
.price-build--light { background: var(--white); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow); }
.price-build--light h3, .price-build--light .price { color: var(--navy); }
.price-build--light .build-desc { color: var(--muted); }
.price-build--light .build-note { color: var(--orange-dark); }
@media (min-width: 800px) { .price-build { padding: 2.25rem; } }

.price { font-size: 2.25rem; font-weight: 800; color: var(--navy); line-height: 1.1; margin-bottom: 0.25rem; }
.price small { font-size: 1rem; font-weight: 600; color: inherit; opacity: 0.75; }
.price-from { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; opacity: 0.75; }

.plans { display: grid; gap: 1.25rem; }
@media (min-width: 800px) { .plans { grid-template-columns: repeat(3, 1fr); } }

.plan { position: relative; display: flex; flex-direction: column; }
.plan .check-list { flex: 1; margin-top: 1rem; }
.plan--featured { border: 2px solid var(--orange); }
.badge {
  position: absolute; top: -0.8rem; left: 1.75rem;
  background: var(--orange); color: var(--navy-dark);
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.04em;
  padding: 0.2rem 0.75rem; border-radius: 999px;
}
.plan-desc { color: var(--muted); font-size: 0.98rem; }

/* "Pay yearly" line under the care plans */
.annual-note { margin: 1.25rem 0 0; text-align: center; font-weight: 700; color: var(--navy); }

/* Hosting Only: a slimmer option row under the care plans */
.hosting-only {
  display: grid; gap: 0.5rem; margin-top: 1.5rem; padding: 1.25rem 1.5rem;
  background: var(--white); border: 1px dashed #b8c4d6; border-radius: var(--radius);
}
.hosting-only h3 { margin: 0; font-size: 1.1rem; }
.hosting-only .price { font-size: 1.6rem; margin: 0; }
.hosting-only p { margin: 0; color: var(--muted); }
@media (min-width: 700px) {
  .hosting-only { grid-template-columns: 180px 1fr; align-items: center; gap: 1.5rem; }
}

.pricing-note {
  margin-top: 1.5rem; padding: 1rem 1.25rem;
  border-left: 4px solid var(--orange); background: var(--white);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.pricing-note p { margin: 0; }

/* ---------- 8b. Extras (no prices: every extra is quoted) ---------- */
.extras {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 0.75rem;
}
@media (min-width: 600px) { .extras { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .extras { grid-template-columns: repeat(3, 1fr); } }
/* Flexbox keeps the round "+" centered beside the text, whether it's 1 line or 2 */
.extras li {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.85rem 1rem;
  background: var(--navy-soft); border-radius: var(--radius);
  font-weight: 600; color: var(--navy);
}
/* The "+" is drawn with two white bars (not a typed character), so it sits dead-center in the circle */
.extras li::before {
  content: ""; flex: none;
  width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background:
    linear-gradient(var(--white), var(--white)) center / 0.6rem 2px no-repeat,
    linear-gradient(var(--white), var(--white)) center / 2px 0.6rem no-repeat,
    var(--orange);
}
.extras-cta { max-width: 40rem; margin: 2rem auto 0; text-align: center; }
.extras-cta p { color: var(--muted); font-size: 1.05rem; }

/* ---------- 9. Portfolio placeholders ---------- */
.work-card {
  display: block; padding: 0; overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}
.work-card:hover { color: inherit; transform: translateY(-3px); box-shadow: 0 10px 28px rgba(13, 27, 51, 0.15); }
.work-thumb {
  aspect-ratio: 16 / 10;
  display: flex; align-items: flex-end;
  padding: 1.25rem 1.25rem 0;
  background: var(--navy-soft);
}
/* Mini "browser window" preview of each sample site */
.mock {
  width: 100%; height: 100%;
  display: grid; grid-template-rows: 18px 1fr;
  border-radius: 8px 8px 0 0; overflow: hidden;
  box-shadow: 0 -2px 12px rgba(13, 27, 51, 0.12);
}
.mock-dots {
  background-color: #e3e8f0;
  background-size: 12px 12px; background-repeat: no-repeat;
  background-image: radial-gradient(circle, #f26b5b 3px, transparent 3.5px), radial-gradient(circle, #f5c04a 3px, transparent 3.5px), radial-gradient(circle, #5ec26a 3px, transparent 3.5px);
  background-position: 6px center, 18px center, 30px center;
}
/* Icon in the middle, business name along the bottom */
.mock-hero {
  display: flex; flex-direction: column; align-items: center;
  padding: 0.75rem 1rem;
  text-align: center;
  background: var(--c1); color: #fff;
}
.mock-icon {
  width: clamp(84px, 34%, 130px); height: auto; aspect-ratio: 1; /* grows with the card */
  padding: 5%;
  margin: auto 0; /* centers the icon in the space above the name */
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.2s;
}
.work-card:hover .mock-icon { transform: scale(1.08) rotate(-4deg); }
.mock-hero b {
  width: 100%; padding-top: 0.5rem;
  border-top: 3px solid var(--c2); /* accent line in each business's color */
  font-size: 1.05rem; line-height: 1.2;
}
.work-link { display: inline-block; margin-top: 0.75rem; font-weight: 700; color: var(--orange-dark); }
.work-body { padding: 1.25rem 1.5rem 1.5rem; }
.work-body h3 { margin-bottom: 0.3rem; }
.work-body p { color: var(--muted); margin: 0; }
/* Add-on pricing note under the sample cards */
.work-note {
  max-width: 40rem; margin: 2rem auto 0; padding: 0.9rem 1.2rem;
  text-align: center; color: var(--navy); font-weight: 600;
  background: var(--navy-soft); border-radius: var(--radius);
}
.work-body h3 { color: var(--navy); }
.tag {
  display: inline-block; margin-bottom: 0.6rem;
  font-size: 0.78rem; font-weight: 700; color: var(--orange-dark);
  background: #fdf0e6; padding: 0.15rem 0.6rem; border-radius: 999px;
}

/* ---------- 10. How it works ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; counter-reset: step; }
.steps li { position: relative; padding-left: 3.75rem; counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--navy); color: var(--white); font-weight: 800;
}
.steps h3 { margin-bottom: 0.3rem; padding-top: 0.4rem; }
.steps p { color: var(--muted); margin: 0; }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps li { padding-left: 0; padding-top: 3.75rem; }
}

/* ---------- 11. About ---------- */
.about { display: grid; gap: 2rem; align-items: center; }
/* Round photo, "zoomed out" so head AND shoulders show.
   The photo is shrunk to 80% of the circle; the gray gradient behind it matches the
   photo's backdrop, and the photo's left/right edges fade out so there's no visible seam.
   If you swap in a different photo, adjust the background colors to match its backdrop. */
.about-photo {
  position: relative; overflow: hidden;
  width: min(240px, 66vw); aspect-ratio: 1; margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(90deg, rgb(198, 207, 208), rgb(190, 198, 201) 50%, rgb(178, 187, 191));
  /* white gap + thin orange ring + soft shadow */
  box-shadow: 0 0 0 6px var(--white), 0 0 0 9px var(--orange), 0 14px 30px rgba(20, 40, 75, 0.18);
}
.about-photo img {
  position: absolute; top: 5%; left: 50%;
  width: 80%; height: auto; max-width: none;
  transform: translateX(-50%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
}
@media (min-width: 800px) {
  .about { grid-template-columns: 300px 1fr; gap: 3.5rem; }
  .about-photo { width: 290px; }
}

/* ---------- 12. FAQ (uses <details>, no JavaScript needed) ---------- */
.faq { max-width: 780px; }
.faq details {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 0.75rem;
}
.faq summary {
  cursor: pointer; list-style: none;
  padding: 1.1rem 3rem 1.1rem 1.25rem; position: relative;
  font-weight: 700; color: var(--navy);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 400; color: var(--orange-dark);
}
.faq details[open] summary::after { content: "\2212"; } /* minus sign */
.faq details p { padding: 0 1.25rem 1.1rem; margin: 0; color: var(--muted); }

/* ---------- 13. Contact form ---------- */
.contact { display: grid; gap: 2.5rem; }
/* "Prefer to talk?" line next to the quote form */
.contact-call {
  margin: 1.25rem 0 0; padding: 0.9rem 1.1rem;
  background: var(--white); border-left: 4px solid var(--orange); border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 600; color: var(--navy);
}
.contact-call a { color: var(--orange-dark); font-weight: 800; white-space: nowrap; }
@media (min-width: 900px) { .contact { grid-template-columns: 1fr 1.3fr; } }

.form { display: grid; gap: 1.1rem; }
.form .card { display: grid; gap: 1.1rem; }
.field label { display: block; font-weight: 700; color: var(--navy); margin-bottom: 0.35rem; }
.field .optional { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit; font-size: 1rem; /* 16px+ stops phones from zooming in on tap */
  color: var(--text);
  padding: 0.75rem 0.9rem;
  border: 1px solid #b8c4d6; border-radius: 8px;
  background: var(--white);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy); outline: 3px solid rgba(232, 119, 46, 0.35); outline-offset: 0; }
.form .btn { justify-self: start; }
.form-small { font-size: 0.9rem; color: var(--muted); margin: 0; }
.honeypot { display: none; } /* spam trap: real people never see or fill this */

/* ---------- 14. Footer ---------- */
.site-footer { background: var(--navy-dark); color: #aebbd0; padding: 3rem 0 2rem; font-size: 0.95rem; }
.footer-grid { display: grid; gap: 2rem; }
.site-footer a { color: #d3dbe8; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.site-footer h2 { color: var(--white); font-size: 1rem; margin-bottom: 0.75rem; }
.footer-call { margin: 0.5rem 0 0; }
.site-footer .footer-call a { color: var(--white); font-weight: 700; white-space: nowrap; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 2.5rem; padding-top: 1.5rem; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }

/* ---------- 15. Simple page (thank-you) ---------- */
.simple-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 4rem 0; }
.simple-page p { color: var(--muted); max-width: 32rem; margin-left: auto; margin-right: auto; }

/* Respect people who turn off animations in their phone settings */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
