/* COET: phone and tablet layout for the services area (2026-11-14). Loaded after every other stylesheet.
   Everything here sits inside a max-width query, so the desktop (>900px) design is untouched. */

/* ── tablet and phone (≤900px) ── */
@media (max-width: 900px) {
  /* At a glance: three equal columns, the number over its label, so nothing is left orphaned on its own row */
  .specs__row { display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; gap: 16px; }
  .specs__row li, .specs__row li:first-child, .specs__row li:nth-child(3) {
    flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 0; border: 0; }

  /* Services: the list alone; site.js moves the drawing under the opened item */
  .svc { display: flex; flex-direction: column; gap: 32px; }
  .svc__stage { order: 0; width: 100%; }
  .svc__stage.is-docked { padding: 16px 0 24px; border-bottom: 1px solid var(--hair); animation: svcDock .55s var(--ease) both; }
  .svc__stage.is-docked .stage { transform: none; }
  .svc__tab:has(+ .svc__stage.is-docked) { border-bottom-color: transparent; }
  .svc__tab:has(+ .svc__stage.is-docked)::before { display: none; }
  .svc__list { width: 100%; }
  .svc__tab { min-height: 44px; }
  /* site.js keeps the tapped row in place itself; the browser's own scroll anchoring would correct it twice */
  .svc { overflow-anchor: none; }
  .svc__tab.is-snap .svc__more { transition: none; }

  /* Team: three across on tablets */
  .people { --cols: 3; --gap: 16px; row-gap: 32px; }

  /* The lead form: one column, fields then calendar then Send */
  .close .lead.lead--sched { display: flex; flex-direction: column; align-items: stretch; gap: 28px; }
  .lead--sched .lead__main { display: flex; flex-direction: column; gap: 28px; }
  .lead__field input, .lead__field textarea { font-size: max(16px, 1em); min-height: 44px; }

  /* The scheduler: every control at least 44px tall */
  .sched { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
  .sched__cal, .sched__times, .sched__foot { width: 100%; }
  .sched__cal, .sched__times { display: flex; flex-direction: column; gap: 12px; }
  .sched__nav { gap: 8px; }
  .sched__nav button { width: 44px; height: 44px; }
  .sched .sched__day { height: 44px; min-width: 0; }
  .sched .sched__slot { height: 44px; font-size: 14px; }
  .sched__slots { gap: 8px; }
  .sched__clear { height: 44px; min-width: 64px; padding: 0 16px; font-size: 14px; }
  .sched__foot { flex-wrap: wrap; }
  .sched__out { flex: 1 1 160px; min-width: 0; }
  .lead--sched .lead__main, .lead--sched .sched, .lead--sched .lead__foot { align-self: stretch; }
  .lead--sched .lead__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
  .lead--sched .lead__foot .btn { min-height: 48px; padding: 0 40px; font-size: 15px; }

  /* Policy pages: long URLs wrap, standalone links are tappable */
  .policy { padding-top: 160px; }
  .policy a { overflow-wrap: anywhere; }
  .policy__rows li { display: flex; flex-direction: column; gap: 6px; }
  .policy__rows a { display: inline-flex; align-items: center; min-height: 44px; }
}

@keyframes svcDock { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .svc__stage.is-docked { animation: none; } }

/* ── services tags: soft pills instead of separator dots, which wrapped to the start of a line ── */
@media (max-width: 900px) {
  .services .tags { gap: 8px; }
  .services .tag + .tag::before { content: none; }
  .services .tag { padding: 6px 12px; border-radius: 999px; background: rgb(255 255 255 / .07); font-size: 13px; }
}

/* ── phones (≤760px) ── */
@media (max-width: 760px) {
  .specs__row { gap: 12px; }
  .specs__l { font-size: 13px; }

  .svc { gap: 24px; }

  .people { --cols: 2; --gap: 12px; row-gap: 28px; }

  .lead__row { display: flex; flex-direction: column; gap: 28px; }
  .lead--sched .lead__foot { flex-direction: column; align-items: stretch; }
  .lead--sched .lead__foot .btn { width: 100%; padding: 0 24px; }
  .lead__status:empty { display: none; }

  /* The month needs every pixel at 375px: a slimmer card and tighter cells keep each day ~43px wide */
  .sched { padding: 16px 12px; border-radius: 18px; }
  .sched__head { padding-inline: 4px; }
  .sched__days, .sched__week { gap: 3px; }
  .sched .sched__day { border-radius: 9px; font-size: 15px; }
  .sched__slots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .sched__label { padding-inline: 4px; }
  .sched__foot { padding-inline: 4px; }

  .policy { padding-top: 132px; }
  .policy__h3 { font-size: 20px; line-height: 28px; margin-top: 32px; }
  .policy__rows h4 { font-size: 18px; line-height: 26px; }
}

/* ── very narrow phones: two times per row ── */
@media (max-width: 359px) {
  .sched__slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Every page (2026-11-14): no strokes between sections, and more room instead ──
   Sections are told apart by space alone now. The full-width hairlines between sections go (the services page's
   sections, the client band, a case study's "next" and "help" blocks, the footer, and the lines between projects
   on the work index); lines that belong to the content inside a section (form fields, list rows, plan cards)
   stay. The section rhythm moves up a step to make up for the lines: 96–160px instead of 64–128px. */
:root { --section: clamp(var(--s9), 11vw, var(--s11)); }
.section, .specs, .client, html.has-gsap main > .client, .cs-help, .foot, .wi-list, .wi-row { border-top: 0; border-bottom: 0; }
.specs, .statement { padding-block: clamp(var(--s9), 10vw, var(--s11)); }
.foot { padding-top: var(--s9); }
.wi-row { padding-block: var(--s8); }
@media (max-width: 900px) { .wi-row { padding-block: var(--s7); } }
