/* =========================================================
   Speedy Tax USA — styles
   Mobile-first: base styles are for phones, @media blocks add
   layout for bigger screens.
   ========================================================= */

/* ---------- COLORS & FONTS: edit here ---------- */
:root {
  /* TODO: paste the exact TaxDome portal blue here */
  --accent: #1976d2;          /* main brand blue (buttons, links, highlights) */
  --accent-hover: #1565c0;    /* slightly darker for hover */
  --on-accent: #ffffff;       /* text on top of --accent. If your TaxDome blue is very light, change to #07104a */
  --accent-soft: #e3effc;     /* pale blue for icon badges and highlights */
  --accent-dark: #0d47a1;     /* dark shade of the brand blue: headings and emphasis */
  --footer-bg: #1565c0;       /* footer: one step darker than the button blue so white text passes WCAG AA (5.7:1) */

  --ink: #07104a;             /* main text (Speedy navy) */
  --muted: #4a5578;           /* secondary text */
  --bg: #ffffff;              /* page background */
  --surface: #ffffff;         /* card background */
  --tint: #f2f7fd;            /* very soft blue for alternate section backgrounds */
  --line: #dbe6f3;            /* borders */
  --focus: #ffb800;           /* keyboard focus ring (Speedy gold) */

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(13, 71, 161, .05), 0 12px 32px -14px rgba(13, 71, 161, .22);
  --shadow-hover: 0 2px 4px rgba(13, 71, 161, .06), 0 18px 40px -16px rgba(13, 71, 161, .32);
  --max: 1120px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 7.5rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1, h2 { color: var(--accent-dark); }
h1 { font-size: clamp(2rem, 7vw, 3.4rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.25rem); font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
img, svg { max-width: 100%; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.container-narrow { max-width: 780px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: .65rem 1.2rem;
  font: inherit; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none;
  border: 2px solid transparent; border-radius: 999px; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-outline { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn-outline:hover { background: var(--accent); color: var(--on-accent); }
.btn-ghost { color: var(--ink); background: transparent; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-small { padding: .5rem 1rem; font-size: .9rem; }
.btn-large { padding: .85rem 1.6rem; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(8px);
}
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 6px 12px; padding-top: 10px; padding-bottom: 4px;
}
.site-nav { order: 3; flex-basis: 100%; min-width: 0; } /* phones: nav sits on its own row */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand:hover { color: var(--ink); }
.brand-name { font-weight: 800; font-size: 1.1rem; white-space: nowrap; }
.brand-logo { width: 48px; height: 48px; object-fit: contain; display: block; flex: none; }

/* Nav: scrolls sideways on small phones, sits inline on larger screens */
.site-nav ul {
  display: flex; gap: 4px; list-style: none; margin: 0; padding: 0 0 6px;
  overflow-x: auto; scrollbar-width: none;
}
.site-nav ul::-webkit-scrollbar { display: none; }
.site-nav a {
  display: block; padding: .45rem .7rem; border-radius: 8px;
  color: var(--muted); font-weight: 600; font-size: .92rem; text-decoration: none; white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); background: var(--accent-soft); }
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(40rem 26rem at 100% 0%, rgba(25, 118, 210, .16), transparent 70%),
    radial-gradient(34rem 22rem at 0% 100%, rgba(25, 118, 210, .10), transparent 70%),
    linear-gradient(180deg, var(--accent-soft) 0%, var(--tint) 60%, #fff 100%);
  padding: clamp(3.5rem, 11vw, 7rem) 0 clamp(3.5rem, 10vw, 6rem);
}
.hero-inner { max-width: 820px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 1.2rem; padding: .4rem 1rem;
  background: #fff; color: var(--accent-dark); border: 1px solid var(--line); border-radius: 999px;
  font-size: .9rem; font-weight: 700; box-shadow: var(--shadow);
}
.eyebrow svg { color: var(--accent); flex: none; }
.accent-text { color: var(--accent); }
.lede { font-size: clamp(1.05rem, 2.5vw, 1.25rem); color: var(--muted); max-width: 40em; margin: 0 auto 2rem; }
.hero-actions { display: flex; flex-direction: column; gap: 12px; align-items: stretch; max-width: 360px; margin: 0 auto; }
.hero .btn-primary { box-shadow: 0 10px 24px -10px rgba(25, 118, 210, .7); }

/* Trust strip */
.trust { padding: 1.5rem 0; background: #fff; border-bottom: 1px solid var(--line); }
.trust-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px;
}
.trust-list li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-weight: 700; font-size: .95rem; color: var(--accent-dark); }
.trust-list .icon-sm {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
}

/* ---------- Sections & cards ---------- */
.section { padding: clamp(3.5rem, 9vw, 6rem) 0; }
.section-tint { background: var(--tint); }
.section h2 { text-align: center; }
.section-intro { text-align: center; color: var(--muted); margin: -.2rem auto 2.2rem; max-width: 36em; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; box-shadow: var(--shadow);
  text-align: center; /* all cards are centered, matching the Where's My Refund page */
}
.card p:last-child { margin-bottom: 0; }
/* Icon badge at the top of a card */
.card .icon {
  display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 1rem;
  border-radius: 16px; background: var(--accent-soft); color: var(--accent);
}

/* How it works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.step-num {
  display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 1rem;
  border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 1.2rem;
  box-shadow: 0 0 0 6px var(--accent-soft);
}
.step p { color: var(--muted); }

/* Inner page title band */
.page-hero {
  background:
    radial-gradient(40rem 22rem at 100% 0%, rgba(25, 118, 210, .14), transparent 70%),
    linear-gradient(180deg, var(--accent-soft) 0%, var(--tint) 100%);
  padding: clamp(2.2rem, 7vw, 4rem) 0 clamp(1.6rem, 5vw, 2.6rem);
  text-align: center;
}
.page-hero .lede { margin-bottom: 0; }
.section-tight { padding-top: clamp(2rem, 5vw, 3rem); }
.section-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 2rem 0 0; }

/* Services */
.service-grid { display: grid; gap: 20px; }
.service h2 { font-size: 1.35rem; }
.service p { color: var(--muted); }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { padding: .2rem 0; font-weight: 600; }
.checklist li::before { content: "\2713"; margin-right: .5rem; color: var(--accent); font-weight: 800; }

/* Tax tools */
.tool-grid { display: grid; gap: 20px; }
.tool { display: flex; flex-direction: column; align-items: center; }
.tool h2 { font-size: 1.25rem; }
.tool > p { color: var(--muted); }
.tool .btn { margin-top: auto; }

/* Tax Day countdown */
.countdown { width: 100%; background: var(--accent-soft); border-color: transparent; text-align: center; margin-bottom: 1.5rem; }
.countdown-label { margin-bottom: 1rem; font-size: 1.05rem; }
.countdown-foot { margin: 1rem 0 0; font-size: .9rem; color: var(--muted); }
.deadlines h2 { font-size: 1.35rem; }
.deadline-list { text-align: left; } /* date + description rows read best left-aligned */
.note { font-size: .9rem; color: var(--muted); }
.countdown-label span { color: var(--muted); }
.countdown-clock { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.countdown-clock div { background: var(--surface); border-radius: 10px; padding: .55rem .25rem; }
.countdown-clock span { display: block; font-size: clamp(1.6rem, 8vw, 3rem); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.countdown-clock small { color: var(--muted); font-size: .78rem; font-weight: 600; }

.deadline-list { list-style: none; margin: 0 0 1rem; padding: 0; width: 100%; }
.deadline-list li { display: flex; flex-wrap: wrap; gap: 2px 12px; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.deadline-list li:last-child { border-bottom: 0; }
.deadline-date { font-weight: 700; min-width: 8.5rem; }
.deadline-name { color: var(--muted); flex: 1 1 14rem; }
.deadline-list li.is-past { opacity: .5; }
.deadline-list li.is-next .deadline-date { color: var(--accent); }

/* FAQ accordion (src/components/Faq.astro) */
.faq-group + .faq-group { margin-top: 2rem; }
.faq-category { color: var(--accent-dark); font-size: 1.15rem; margin: 0 0 .75rem; }
.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.faq details:hover, .faq details[open] { border-color: var(--accent); }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.2rem; font-weight: 700; border-radius: 12px; text-align: left;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover .faq-question { color: var(--accent); }
.faq-icon {
  flex: 0 0 auto; position: relative; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-soft); transition: background-color .15s ease, transform .2s ease;
}
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px;
  margin: -1px 0 0 -6px; border-radius: 2px; background: var(--accent);
  transition: background-color .15s ease, transform .2s ease;
}
.faq-icon::after { transform: rotate(90deg); }
.faq summary:hover .faq-icon, .faq details[open] .faq-icon { background: var(--accent); }
.faq summary:hover .faq-icon::before, .faq summary:hover .faq-icon::after,
.faq details[open] .faq-icon::before, .faq details[open] .faq-icon::after { background: #fff; }
.faq details[open] .faq-icon::after { transform: rotate(0deg); } /* plus becomes minus */
.faq-answer { padding: 0 1.2rem 1.1rem; color: var(--muted); text-align: left; }
.faq-answer p { margin: 0 0 .75rem; }
.faq-answer ol, .faq-answer ul { margin: 0 0 .75rem; padding-left: 1.4rem; }
.faq-answer li { margin-bottom: .3rem; }
.faq-answer > :last-child { margin-bottom: 0; }
.faq-closing { margin-top: 2.5rem; text-align: center; }
.faq-closing h2 { font-size: 1.3rem;  color: var(--accent-dark); margin-bottom: .4rem; }
.faq-closing p { color: var(--muted); margin: 0; }
@media (prefers-reduced-motion: reduce) {
  .faq details, .faq-icon, .faq-icon::before, .faq-icon::after { transition: none; }
}

/* Where's my refund */
.search-box { max-width: 520px; margin: 0 auto 2rem; text-align: center; }
.search-box label { display: block; font-weight: 700; margin-bottom: .5rem; }
.search-box input {
  width: 100%; min-height: 48px; padding: .7rem 1rem;
  font: inherit; font-size: 1.05rem; color: var(--ink);
  background: var(--surface); border: 2px solid var(--line); border-radius: 12px;
}
.search-box input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.search-count { min-height: 1.5em; margin: .5rem 0 0; font-size: .9rem; color: var(--muted); }
.agency-group { margin-bottom: 2rem; }
.group-title { font-size: 1.15rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.agency-grid { display: grid; gap: 12px; }
.agency { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 1.2rem; }
.agency[hidden] { display: none; }
.agency-top { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: .3rem; }
.agency-top h3 { margin: 0; }
.agency-abbr {
  padding: .1rem .5rem; border-radius: 6px; font-size: .78rem; font-weight: 800;
  background: var(--accent-soft); color: var(--accent);
}
.agency-name { color: var(--muted); font-size: .92rem; margin-bottom: .4rem; }
.agency-notes { font-size: .9rem; color: var(--muted); }
.agency .btn { margin-top: auto; }
.empty-msg, .load-error { text-align: center; }
.no-tax { text-align: center; }
.no-tax h2 { font-size: 1.25rem; }
.no-tax ul { columns: 2; column-gap: 2rem; padding-left: 1.2rem; margin: 0; }
.no-tax li { break-inside: avoid; }

/* Pricing */
.pricing { display: grid; gap: 16px; }
.price-group h2 { font-size: 1.35rem; margin-bottom: .3rem; }
.price-list { text-align: left; } /* item on the left, price on the right */
.price-intro { color: var(--muted); }
.price-list { list-style: none; margin: 0; padding: 0; }
.price-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: .8rem 0; border-top: 1px solid var(--line);
}
.price-name { display: block; font-weight: 700; }
.price-desc { display: block; font-size: .9rem; color: var(--muted); }
.price-amount { flex: none; font-weight: 800; font-size: 1.1rem; color: var(--accent); text-align: right; }
.price-amount.is-placeholder { font-size: .85rem; font-weight: 600; color: var(--muted); }
.pricing-note { text-align: center; color: var(--muted); margin: 1.5rem auto 0; max-width: 36em; }

/* Terms and other Markdown pages */
.prose { max-width: 70ch; margin: 0 auto; }
.prose h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); }
.prose h2 { font-size: 1.35rem; text-align: left; margin-top: 2rem; }
.prose li { margin-bottom: .3rem; }

/* Contact (everything centered) */
.contact { text-align: center; }
.contact-grid { display: grid; gap: 16px; }
.contact-item { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; text-decoration: none; color: var(--ink); }
.hours { margin: .3rem 0 0; }
.hours div { margin-bottom: .35rem; }
.hours dt { font-weight: 700; }
.hours dd { margin: 0; color: var(--muted); }
a.contact-item:hover { border-color: var(--accent); color: var(--ink); }
.contact-label { font-size: .85rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.contact-value { font-size: 1.15rem; font-weight: 700; overflow-wrap: anywhere; }
a.contact-item .contact-value { color: var(--accent); }
.portal-reminder { text-align: center; margin: 2rem auto 0; max-width: 36em; }

/* ---------- Footer ---------- */
/* Background is --footer-bg (darker shade of the button blue). Keep all footer text solid
   white or very close to it so it passes WCAG AA contrast. */
.site-footer { background: var(--footer-bg); color: #fff; padding: 3rem 0 2rem; font-size: .92rem; }
.footer-inner { display: flex; flex-direction: column; gap: 1.8rem; margin-bottom: 1.8rem; }
.footer-name { color: #fff; font-weight: 800; font-size: 1.1rem; margin-bottom: .4rem !important; }
.footer-inner p { margin: 0 0 .3rem; }
.site-footer a { color: #fff; text-underline-offset: 3px; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-heading { color: #fff; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; margin-bottom: .6rem !important; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .1rem 1.5rem; }
.footer-nav a { display: inline-block; padding: .3rem 0; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.copyright { margin: 0 0 .8rem; }
.disclaimer { border-top: 1px solid rgba(255, 255, 255, .35); padding-top: 1.2rem; margin: 0; font-size: .85rem; color: #fff; }

/* ---------- Small phones: keep logo and login button on one row ---------- */
@media (max-width: 419px) {
  .header-inner { gap: 6px 8px; }
  .brand { gap: 8px; }
  .brand-name { font-size: .95rem; }
  .brand-logo { width: 40px; height: 40px; }
  .header-cta { font-size: .8rem; padding: .45rem .75rem; min-height: 40px; }
}

/* ---------- Bigger screens ---------- */
@media (min-width: 640px) {
  .hero-actions { flex-direction: row; justify-content: center; max-width: none; }
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
  .trust-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .agency-grid { grid-template-columns: repeat(2, 1fr); }
  .no-tax ul { columns: 3; }
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .footer-nav ul { grid-template-columns: repeat(2, auto); }
}

@media (min-width: 900px) {
  html { scroll-padding-top: 5rem; }
  .header-inner { flex-wrap: nowrap; padding-top: 12px; padding-bottom: 12px; }
  .site-nav { order: 0; flex: 1 1 auto; }
  .site-nav ul { justify-content: center; padding: 0; }
  .steps, .service-grid, .tool-grid, .agency-grid { grid-template-columns: repeat(3, 1fr); }
  .trust-list li { flex-direction: row; justify-content: center; text-align: left; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}
