/* -
   jusTask — site styles
   - */

:root {
  --brand-ink:          #1f2a37;   /* headings + body text */
  --brand-primary:      #1f6b78;   /* buttons, active nav, selected chips — sampled from the logo */
  --brand-primary-dark: #154e58;   /* hover / links */
  --brand-accent:       #cfe4e6;   /* soft teal highlight, used sparingly */

  --bg:      #fbfaf8;
  --surface: #ffffff;
  --border:  #e2e0db;
  --muted:   #6b6f76;
  --error:   #c0392b;

  --radius:      12px;
  --radius-pill: 999px;
  --maxw:        720px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
          Arial, "Apple Color Emoji", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--brand-ink);
  background: var(--bg);
}

a { color: var(--brand-primary-dark); }

/* - Sticky pill nav (no hamburger) - */
.pillnav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
  .pillnav {
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    backdrop-filter: saturate(180%) blur(8px);
  }
}

.pillnav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
}

.pillnav__brand {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--brand-ink);
  white-space: nowrap;
  flex-shrink: 0;   /* the logo never squashes; the pills scroll instead */
}
.pillnav__brand img {
  display: block;
  height: 60px;
  width: auto;
}

.pillnav__links {
  display: flex;
  gap: 8px;
  margin-left: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pillnav__links::-webkit-scrollbar { display: none; }

.pill {
  flex: 0 0 auto;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--brand-ink);
  text-decoration: none;
  font-size: 0.92rem;
  white-space: nowrap;
}
.pill:hover { border-color: var(--brand-primary); }
.pill--active,
.pill[aria-current="page"] {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}

/* - Page layout - */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 16px 64px;
}
.page__head { margin: 48px 0px; }
.page__faq { margin: 12px 0 0; font-size: 0.95rem; }

h1 {
  font-size: 2.4rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.lede {
  margin: 0;
  font-size: 1.1rem;
  color: var(--muted);
}

/* - Form - */
.form { display: grid; gap: 22px; }

.field {
  display: grid;
  gap: 6px;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.field > label,
.field > legend {
  font-weight: 600;
  font-size: 0.95rem;
}
legend { padding: 0; }

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.req { color: var(--brand-primary-dark); }
.opt { color: var(--muted); font-weight: 400; }

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  font: inherit;
  color: inherit;
  width: 100%;
  padding: 11px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
textarea { resize: vertical; }

input:focus-visible,
textarea:focus-visible,
.pill:focus-visible,
.btn:focus-visible,
.chip input:focus-visible + span,
.check input:focus-visible + span {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

.field-group {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
}

/* - Task chips - */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.chip { position: relative; display: inline-flex; }
.chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.chip span {
  display: inline-block;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.95rem;
  user-select: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.chip input:hover + span { border-color: var(--brand-primary); }
.chip input:checked + span {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}

.field--nested { margin-top: 12px; }

/* - Consent checkbox row - */
.check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  font-size: 0.92rem;
  cursor: pointer;
}
.check input {
  margin-top: 3px;
  accent-color: var(--brand-primary);
}

/* - Error states - */
input.is-invalid,
textarea.is-invalid { border-color: var(--error); }
.chips.is-invalid {
  outline: 2px solid var(--error);
  outline-offset: 6px;
  border-radius: var(--radius);
}
.check input.is-invalid { outline: 2px solid var(--error); outline-offset: 2px; }
.form__error {
  margin: 0;
  color: var(--error);
  font-weight: 600;
  font-size: 0.92rem;
}

/* - Button - */
.btn {
  justify-self: start;
  font: inherit;
  font-weight: 600;
  padding: 12px 26px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--brand-primary);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--brand-primary-dark); }
.btn:disabled { opacity: 0.6; cursor: default; }

/* - Direct-contact card + footer - */
.fallback {
  margin-top: 44px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.fallback h2 { margin: 0 0 6px; font-size: 1.05rem; }
.fallback p { margin: 0; }

/* Full width so the top border spans the page like the nav's bottom
   border; the text keeps the same column as the nav content. */
.foot {
  padding: 24px 16px 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}
.foot p {
  max-width: calc(var(--maxw) - 32px);
  margin: 0 auto;
}
.foot p + p { margin-top: 4px; }
.foot a { color: var(--muted); }

/* - Honeypot (visually removed, still focusable off-screen) - */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* - Prose pages (privacy) - */
.prose { max-width: var(--maxw); }
.prose h2 { font-size: 1.15rem; margin: 28px 0 8px; }
.prose p, .prose li { color: #333; }
.prose ul { padding-left: 20px; }
.note {
  padding: 12px 14px;
  border-left: 3px solid var(--brand-accent);
  background: var(--surface);
  border-radius: 6px;
  font-size: 0.9rem;
}

/* - Home: hero - */
.hero { padding: 48px 0 8px; }
.hero h1 { font-size: 2.4rem; margin-bottom: 12px; }
.hero .lede { font-size: 1.2rem; max-width: 52ch; }
.hero__cta { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }

.btn--ghost {
  background: transparent;
  color: var(--brand-primary-dark);
  border: 1px solid var(--border);
}
.btn--ghost:hover { background: var(--surface); border-color: var(--brand-primary); }

/* - Home: section - */
.section {
  margin-top: 40px;
  padding: 40px 0;
  border-top: 1px solid var(--border);
}
.section > h2 { font-size: 1.4rem; margin: 0 0 6px; }
.section__intro { margin: 0 0 24px; color: var(--muted); max-width: 56ch; }

/* - Home: services grid - */
.services {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.service {
  position: relative;
  overflow: hidden;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.55s cubic-bezier(.22, .82, .35, 1),
    transform 0.55s cubic-bezier(.22, .82, .35, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  transition-delay: var(--reveal-delay, 0s);
}
.service.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.service::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -30%;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--brand-accent) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}
.service:hover {
  border-color: var(--brand-primary);
  box-shadow: 0 14px 28px -18px rgba(21, 78, 88, 0.45);
  transform: translateY(-4px);
}
.service:hover::before { opacity: 0.7; transform: scale(1); }
.service h3 { position: relative; margin: 0 0 6px; font-size: 1.02rem; }
.service p { position: relative; margin: 0; font-size: 0.92rem; color: #333; }
.service ul { position: relative; margin: 0; padding-left: 18px; font-size: 0.92rem; color: #333; }
.service li + li { margin-top: 2px; }

/* - Home: testimonials - */
/* Separate horizontal scroll area — one card in view at a time, snap
   scrolling, with dot indicators below (one per card, built in js/home.js). */
.testimonials {
  position: relative;
  display: flex;
  flex-direction: row;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 6px;
}
.testimonials:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }

.testimonial {
  flex: 0 0 100%;            /* exactly one card in view; swipe for next / previous */
  min-height: 190px;
  scroll-snap-align: center;
  scroll-snap-stop: always; /* a swipe advances one card, never skips */
  margin: 0;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.testimonial blockquote { margin: 0; }
.testimonial blockquote p { margin: 0; font-size: 0.98rem; }

.testimonial figcaption {
  margin-top: 14px;
  font-size: 0.85rem;
}
.testimonial__name { font-weight: 600; color: var(--brand-ink); }
.testimonial__city { color: var(--muted); }
.testimonial__name + .testimonial__city::before {
  content: "\00B7";
  margin: 0 6px;
  color: var(--border);
}

.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 16px;
}
.testimonial-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.testimonial-dots button[aria-current="true"] {
  background: var(--brand-primary);
  transform: scale(1.25);
}
.testimonial-dots button:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 3px;
}

/* - Home: about - */
.about {
  display: grid;
  gap: 24px;
  grid-template-columns: 200px 1fr;
  align-items: start;
}
.about__photo {
  border-radius: var(--radius);
  background: var(--brand-accent);
  overflow: hidden;
}
.about__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about__body p { margin: 0 0 12px; }
.about__body p:last-child { margin-bottom: 0; }

/* - Home: closing CTA - */
.cta-band {
  margin-top: 44px;
  padding: 28px;
  text-align: center;
  background: var(--brand-primary);
  color: #fff;
  border-radius: var(--radius);
}
.cta-band h2 { margin: 0 0 14px; font-size: 1.3rem; }
.cta-band .btn { background: #fff; color: var(--brand-primary-dark); }
.cta-band .btn:hover { background: var(--brand-accent); }

/* - Tips page - */
.section--etat    { --accent: var(--brand-primary); }
.section--driving { --accent: #c98a2c; }
.section--permits { --accent: #6b4a8a; }

.tips-list {
  list-style: none;
  counter-reset: tip;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 12px;
}
.tips-list li {
  counter-increment: tip;
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #333;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.5s cubic-bezier(.22, .82, .35, 1),
    transform 0.5s cubic-bezier(.22, .82, .35, 1),
    border-color 0.25s ease,
    box-shadow 0.25s ease;
  transition-delay: var(--reveal-delay, 0s);
}
.tips-list li.is-visible { opacity: 1; transform: translateY(0); }
.tips-list li::before {
  content: counter(tip);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent, var(--brand-primary));
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}
.tips-list li:hover {
  border-color: var(--accent, var(--brand-primary));
  box-shadow: 0 12px 24px -16px rgba(31, 42, 55, 0.28);
}
.tip__body { min-width: 0; }
.tips-list li strong { display: block; margin-bottom: 4px; color: var(--brand-ink); }

.section--tip .note { border-left-color: var(--accent, var(--brand-accent)); }

/* - FAQ page - */
/* Native <details> cards in the same style as the tip cards. */
.faq-list { display: grid; gap: 12px; }
.faq {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  scroll-margin-top: 96px;   /* clear the sticky nav on direct links */
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.faq:hover,
.faq[open] { border-color: var(--brand-primary); }
.faq[open] { box-shadow: 0 12px 24px -16px rgba(31, 42, 55, 0.28); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-accent);
  color: var(--brand-primary-dark);
  font-size: 1.1rem;
  line-height: 1;
}
.faq[open] summary::after { content: "\2212"; background: var(--brand-primary); color: #fff; }
.faq summary:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  border-radius: var(--radius);
}
.faq__answer { padding: 0 18px 16px; color: #333; }
.faq__answer p { margin: 0 0 10px; }
.faq__answer p:last-child { margin-bottom: 0; }
.faq__answer ul { margin: 0 0 10px; padding-left: 20px; }

/* - Thank-you page */
.thanks { text-align: center; padding-top: 48px; }
.thanks h1 { font-size: 2.1rem; }
.thanks .lede { margin: 12px auto 28px; max-width: 42ch; }

/* - Responsive - */
@media (max-width: 600px) {
  .field-group { grid-template-columns: 1fr; }
  /* Smaller logo and pills so Home, Tips and Contact all fit on a
     320px-wide phone without scrolling. */
  .pillnav__inner { padding: 8px 10px; gap: 8px; }
  .pillnav__brand img { height: 44px; }
  .pillnav__links { gap: 6px; }
  .pill { padding: 6px 11px; font-size: 0.88rem; }
  h1 { font-size: 1.6rem; }
  .hero h1 { font-size: 1.9rem; }
  .about { grid-template-columns: 1fr; }
  .about__photo { max-width: 200px; }
  .page__head h1 { font-size: 1.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

