/* ============ AiD Design — sections ============ */

/* ---------- Hero (fills the first screen; next section stays below the fold) ---------- */
.hero {
  min-height: calc(100svh - 68px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 5vw, 72px) var(--pad-x) clamp(40px, 6vw, 80px);
  text-align: center;
}
.hero-ctas { display: flex; gap: 14px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }

/* ---------- Tools (circle → row) ---------- */
.tools { padding: clamp(80px, 11vw, 160px) var(--pad-x); }
.tools-title { text-align: center; font-size: clamp(26px, 3.2vw, 40px); }
.tools-stage { position: relative; height: 460px; margin-top: 8px; }
.chip {
  position: absolute;
  left: 0; top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  height: 74px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  color: var(--ink);
  will-change: transform;
}
.chip img, .chip svg { width: 26px; height: 26px; }
/* Brand chips link out. The JS owns transform every frame, so the hover
   affordance has to live on colour alone. */
a.chip { text-decoration: none; cursor: pointer; transition: border-color 0.28s, background-color 0.28s, box-shadow 0.35s; }
a.chip:hover, a.chip:focus-visible { border-color: var(--warm-soft); background: var(--paper); box-shadow: 0 0 20px 1px rgba(192,91,46,0.12); }
a.chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.chip-word { font: 500 14px/1 var(--font-body); letter-spacing: 0.01em; white-space: nowrap; }
@media (max-width: 760px) { .tools-stage { height: 420px; } .chip { min-width: 60px; height: 60px; padding: 0 16px; } }

/* ---------- Services: compact grid, living icons ---------- */
.services { padding: clamp(60px, 9vw, 130px) var(--pad-x); border-top: 1px solid var(--scroll-line, var(--line)); }
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.service-card {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 28px);
  padding: clamp(20px, 2.6vw, 30px);
  border: 1px solid var(--scroll-line, var(--line));
  border-radius: var(--radius-m);
  background: var(--paper);
  transition: transform 0.3s cubic-bezier(.22,.68,0,1), border-color 0.35s, box-shadow 0.4s ease;
}
.service-card:hover { transform: translateY(-4px); }
/* soft hue glow around the whole box on hover, tinted to the card's warm/cool identity */
.service-card[data-hue="warm"]:hover {
  border-color: var(--warm-soft);
  box-shadow: 0 0 28px 2px rgba(192,91,46,0.16), 0 18px 44px -18px rgba(192,91,46,0.38);
}
.service-card[data-hue="cool"]:hover {
  border-color: var(--cool-soft);
  box-shadow: 0 0 28px 2px rgba(109,124,190,0.18), 0 18px 44px -18px rgba(109,124,190,0.4);
}
.service-icon {
  flex: 0 0 clamp(96px, 10vw, 132px);
  aspect-ratio: 1;
  border-radius: 16px;
  background: radial-gradient(120% 120% at 30% 18%, #1b1f29 0%, #0d0f14 100%);
  border: 1px solid rgba(255,255,255,0.07);
  overflow: hidden;
}
.service-icon canvas { width: 100%; height: 100%; }
.service-copy h3 { font-size: clamp(19px, 2vw, 24px); margin-bottom: 8px; }
.service-copy p { color: var(--ink-soft); font-size: 15px; line-height: 1.55; }
.service-more { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 500; color: var(--ink-soft); transition: color 0.2s, transform 0.25s cubic-bezier(.22,.68,0,1); }
.service-card:hover .service-more { color: var(--ink); transform: translateX(3px); }

/* ---------- Stories (dark placeholder band) ---------- */
.stories {
  margin: 0 var(--pad-x);
  border-radius: var(--radius-l);
  background: radial-gradient(120% 160% at 20% 0%, #232019 0%, #0d0c0b 45%, #101216 100%);
  color: #fff;
}
.stories-inner { padding: clamp(64px, 9vw, 120px) clamp(28px, 6vw, 96px); text-align: center; }
.stories h2 { font-size: clamp(30px, 4vw, 52px); }
.stories-note { margin-top: 14px; color: rgba(255,255,255,0.6); }

/* ---------- Doors (Antigravity-style centred stacks over dot art) ---------- */
.doors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 36px);
  padding: clamp(70px, 10vw, 140px) var(--pad-x);
}
.door {
  padding: clamp(64px, 8vw, 130px) clamp(28px, 4vw, 56px);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.door-art { position: absolute; inset: 0; pointer-events: none; }
.door-art canvas { width: 100%; height: 100%; }
.door-body { position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.door-badge {
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  color: var(--ink-soft);
}
.door h2 { font-size: clamp(26px, 3.1vw, 40px); line-height: 1.16; }
.door-tag { display: block; color: var(--ink-soft); font-weight: 450; }

/* ---------- Rails (work + blog) ---------- */
.work, .blog { padding: clamp(60px, 9vw, 120px) 0 clamp(60px, 9vw, 120px) var(--pad-x); }
.work { border-top: 1px solid var(--scroll-line, var(--line)); }
.rail-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-right: var(--pad-x);
}
.rail-actions { display: flex; align-items: center; gap: 16px; }
.rail-nav { display: flex; gap: 8px; }
.rail-nav button {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 17px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.rail-nav button:hover { border-color: var(--ink); transform: translateY(-2px); }
.rail {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px var(--pad-x) 26px 2px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.card {
  scroll-snap-align: start;
  flex: 0 0 clamp(260px, 30vw, 380px);
  border: 1px solid var(--scroll-line, var(--line));
  border-radius: var(--radius-m);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 240px;
  background: var(--paper);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(.22,.68,0,1), border-color 0.3s;
}
.card:hover { transform: translateY(-5px); border-color: var(--ink); }

/* Work cards carry a project hero image */
.work-card { padding: 0; gap: 0; }
.card-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper-warm);
  border-bottom: 1px solid var(--scroll-line, var(--line));
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s cubic-bezier(.22,.68,0,1); }
.work-card:hover .card-thumb img { transform: scale(1.06); }
.card-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card h3 { font-size: 22px; }
.card-tag {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.card-go, .card-date { margin-top: auto; font-size: 14px; color: var(--ink-soft); }
.card:hover .card-go { color: var(--ink); }
.blog-card[data-hue="warm"]:hover { border-color: var(--warm); }
.blog-card[data-hue="cool"]:hover { border-color: var(--cool); }
.work-card { background: var(--paper-warm); }

/* ---------- Partnership ---------- */
.partnership {
  padding: clamp(70px, 10vw, 140px) var(--pad-x);
  background: var(--paper-warm);
  border-top: 1px solid var(--scroll-line, var(--line));
  border-bottom: 1px solid var(--scroll-line, var(--line));
}
.partnership h2 { font-size: clamp(28px, 3.6vw, 46px); margin-bottom: 16px; }
.partnership p { color: var(--ink-soft); max-width: 52ch; }
.partner-intro { max-width: 640px; margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }
.partner-intro p { margin: 0 auto; }

/* Dark partner showcase — placeholder echoing MyLocalEverything's own hero */
.partner-showcase {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-l);
  background: radial-gradient(130% 150% at 18% -10%, #0c1424 0%, #060a12 52%, #0a1730 100%);
  color: #fff;
  padding: clamp(40px, 6vw, 84px) clamp(28px, 5vw, 80px);
}
.ps-art { position: absolute; inset: 0; pointer-events: none; }
.ps-art canvas { width: 100%; height: 100%; }
.ps-body { position: relative; max-width: 780px; }
.ps-eyebrow { font: 600 13px/1 var(--font-body); letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.55); margin-bottom: 20px; }
.ps-headline { font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: clamp(30px, 5.2vw, 62px); line-height: 1.06; letter-spacing: -0.01em; color: #fff; }
.ps-headline em { color: #4d8bff; font-style: italic; }
.ps-copy { margin-top: 22px; color: rgba(255,255,255,0.72); max-width: 60ch; line-height: 1.62; }
.ps-copy strong { color: #fff; font-weight: 600; }
.ps-links { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.btn-light { background: #fff; color: #0d0c0b; }
.btn-light:hover { transform: translateY(-2px); background: #eee; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.35); }
.btn-ghost-light:hover { transform: translateY(-2px); border-color: #fff; }

/* ---------- FAQ ---------- */
.faq { padding: clamp(60px, 9vw, 120px) var(--pad-x); max-width: 980px; margin: 0 auto; }
.faq details { border-top: 1px solid var(--scroll-line, var(--line)); }
.faq details:last-of-type { border-bottom: 1px solid var(--scroll-line, var(--line)); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 40px 22px 0;
  font: 500 clamp(17px, 2vw, 20px)/1.4 var(--font-display);
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px; top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  font-weight: 300;
  color: var(--ink-soft);
  transition: transform 0.25s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 0 24px; color: var(--ink-soft); max-width: 68ch; }

/* ---------- CTA ---------- */
.cta { text-align: center; padding: clamp(80px, 12vw, 170px) var(--pad-x); }
.cta h2 { font-size: clamp(38px, 6vw, 78px); letter-spacing: -0.03em; }
.cta p { margin: 18px 0 34px; color: var(--ink-soft); font-size: clamp(16px, 2vw, 19px); }

/* ---------- Contact (home) ---------- */
.contact {
  padding: clamp(80px, 12vw, 170px) var(--pad-x);
  background: var(--paper-warm);
  border-top: 1px solid var(--line);
}
.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
}
.contact-copy h2 { font-size: clamp(34px, 4.6vw, 62px); letter-spacing: -0.03em; }
.contact-lede { margin: 18px 0 30px; color: var(--ink-soft); font-size: clamp(16px, 2vw, 19px); max-width: 34ch; }
.contact-book { margin-bottom: 14px; }
.contact-or { margin: 0 0 26px; font-size: 15px; color: var(--ink-soft); max-width: 32ch; }
.contact-direct { list-style: none; display: grid; gap: 6px; font-size: 15px; color: var(--ink-soft); }
.contact-direct a { border-bottom: 1px solid var(--line); transition: border-color 0.2s, color 0.2s; }
.contact-direct a:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* Form */
.contact-form { display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 14px; font-weight: 500; color: var(--ink); }
.field .opt { color: var(--ink-soft); font-weight: 400; }
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 128px; line-height: 1.55; }
.field select { appearance: none; cursor: pointer; padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2355524e' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #d8d4cd; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--cool);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cool) 18%, transparent);
}
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--warm-deep); }

/* Honeypot — off-screen, never shown, never focusable */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 4px; }
.form-foot .btn:disabled { opacity: 0.55; cursor: progress; transform: none; }
.form-status { font-size: 15px; color: var(--ink-soft); margin: 0; max-width: 42ch; }
.form-status.is-ok { color: var(--ink); font-weight: 500; }
.form-status.is-error { color: var(--warm-deep); }
.form-status a { border-bottom: 1px solid currentColor; }

@media (max-width: 900px) {
  .contact-inner { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .form-foot .btn { width: 100%; justify-content: center; }
}

/* ---------- Reveal-on-scroll primitives ---------- */
.reveal { opacity: 0; transform: translateY(28px); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .services-grid, .partnership { grid-template-columns: 1fr; }
  .doors { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .rail-head { flex-direction: column; align-items: flex-start; }
  .rail-nav { display: none; }
  .service-card { align-items: flex-start; }
  .service-icon { flex-basis: 84px; }
  .hero-headline { min-height: 3.3em; }
}
/* Below ~390px the long phrase runs to four lines while the short ones are
   one. Reserve the tallest so the box never changes height as the loop
   cycles — measured, not guessed: 4 lines x 1.06 line-height. */
@media (max-width: 400px) {
  .hero-headline { min-height: 4.3em; }
}
