/* Astar Tasks — marketing site
 *
 * Bootstrap 5.3 supplies the grid, the navbar and the utilities. This file does
 * two things and nothing else: it maps Bootstrap's own CSS variables onto the
 * palette in design/astar_dynamic_productivity/DESIGN.md, and it adds the few
 * components Bootstrap has no equivalent for — the phone frame chiefly.
 *
 * Every colour below is copied from that file rather than picked by eye, so the
 * site and the app are the same green.
 */

:root {
  /* Brand — from DESIGN.md */
  --as-primary: #006b34;
  --as-primary-container: #008643;
  --as-primary-deep: #005227;
  --as-mint: #6bfe9c;
  --as-mint-dim: #4ae183;
  --as-mint-bright: #8afaa7;

  --as-ink: #1a1c1e;
  --as-ink-variant: #3e4a3f;
  --as-outline: #6e7a6e;
  --as-outline-variant: #bdcabc;

  --as-surface: #f9f9fc;
  --as-surface-low: #f3f3f6;
  --as-surface-container: #eeeef0;
  --as-white: #ffffff;
  --as-inverse: #2f3133;

  --as-gradient: linear-gradient(135deg, var(--as-primary) 0%, var(--as-primary-container) 55%, #00a352 100%);

  /* Bootstrap overrides */
  --bs-primary: #006b34;
  --bs-primary-rgb: 0, 107, 52;
  --bs-body-color: #1a1c1e;
  --bs-body-bg: #f9f9fc;
  --bs-body-font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-font-size: 1rem;
  --bs-body-line-height: 1.5;
  --bs-border-radius: 0.5rem;
  --bs-border-color: #e2e2e5;
  --bs-link-color: #006b34;
  --bs-link-color-rgb: 0, 107, 52;
  --bs-link-hover-color: #005227;
  --bs-emphasis-color: #1a1c1e;
}

/* --------------------------------------------------------------------------
 * Type
 *
 * Hanken Grotesk is served from this origin as a variable font: one file
 * covers 400-700, so the weights below cost no extra requests. Self-hosted
 * rather than loaded from Google's CDN — see README.md, "No third parties".
 * ------------------------------------------------------------------------ */
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, .display-title {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--as-ink);
}

.lead {
  color: var(--as-ink-variant);
  font-size: 1.125rem;
  line-height: 1.6;
}

.label-caps {
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.text-muted-ink { color: var(--as-ink-variant) !important; }

/* Section rhythm: 24px+ between major blocks, per DESIGN.md */
.section { padding: 4.5rem 0; }
@media (max-width: 767.98px) { .section { padding: 3rem 0; } }

.section-tint { background: var(--as-surface-low); }

/* --------------------------------------------------------------------------
 * Navbar
 * ------------------------------------------------------------------------ */
.navbar-astar {
  background: rgba(249, 249, 252, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bs-border-color);
}

.navbar-astar .navbar-brand {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--as-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-astar .navbar-brand img { height: 30px; width: auto; }

.navbar-astar .nav-link {
  font-weight: 600;
  color: var(--as-ink-variant);
  padding-inline: 0.85rem;
}

.navbar-astar .nav-link:hover,
.navbar-astar .nav-link:focus-visible { color: var(--as-primary); }

.navbar-astar .nav-link.active {
  color: var(--as-primary);
  position: relative;
}

@media (min-width: 992px) {
  .navbar-astar .nav-link.active::after {
    content: "";
    position: absolute;
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.15rem;
    height: 2px;
    border-radius: 2px;
    background: var(--as-primary);
  }
}

.navbar-toggler { border-color: var(--as-outline-variant); }
.navbar-toggler:focus { box-shadow: 0 0 0 0.2rem rgba(0, 107, 52, 0.25); }

/* --------------------------------------------------------------------------
 * Buttons
 *
 * Primary is the brand gradient; secondary is a ghost with a 1px emerald
 * border. Both keep a visible focus ring — a gradient button with the outline
 * removed is unusable by keyboard.
 * ------------------------------------------------------------------------ */
.btn { font-weight: 600; border-radius: 0.5rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1.0625rem; }

.btn-astar {
  background: var(--as-gradient);
  color: #fff;
  border: 0;
  box-shadow: 0 6px 18px rgba(0, 107, 52, 0.22);
}
.btn-astar:hover, .btn-astar:focus { color: #fff; filter: brightness(1.06); }
.btn-astar:active { filter: brightness(0.95); }

.btn-astar-ghost {
  background: transparent;
  color: var(--as-primary);
  border: 1px solid var(--as-primary);
}
.btn-astar-ghost:hover, .btn-astar-ghost:focus {
  background: rgba(0, 107, 52, 0.06);
  color: var(--as-primary-deep);
  border-color: var(--as-primary-deep);
}

.btn:focus-visible {
  outline: 2px solid var(--as-primary-deep);
  outline-offset: 2px;
  box-shadow: none;
}

/* On the dark band the ghost button has to invert or it disappears. */
.band-dark .btn-astar-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}
.band-dark .btn-astar-ghost:hover,
.band-dark .btn-astar-ghost:focus {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: #fff;
}
.band-dark .btn:focus-visible { outline-color: var(--as-mint); }

/* --------------------------------------------------------------------------
 * Hero
 * ------------------------------------------------------------------------ */
.hero {
  padding: 4rem 0 3.5rem;
  background:
    radial-gradient(1100px 520px at 88% -10%, rgba(107, 254, 156, 0.30), transparent 62%),
    radial-gradient(900px 480px at -5% 10%, rgba(0, 107, 52, 0.08), transparent 60%),
    var(--as-surface);
  overflow: hidden;
}

.hero h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  line-height: 1.1;
}

.hero .lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); max-width: 34rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  background: rgba(0, 107, 52, 0.08);
  color: var(--as-primary-deep);
  border: 1px solid rgba(0, 107, 52, 0.16);
}

/* --------------------------------------------------------------------------
 * Phone frame
 *
 * The screenshots already contain the Android status bar, so the frame is a
 * plain bezel: no notch, no fake clock. Width is capped in rem and the image
 * fills it, so one rule scales the whole thing on small screens.
 * ------------------------------------------------------------------------ */
.phone {
  --phone-width: 16.25rem;
  width: var(--phone-width);
  max-width: 100%;
  padding: 0.6rem;
  border-radius: 2.25rem;
  background: linear-gradient(160deg, #2f3133 0%, #1a1c1e 100%);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.1),
    0 24px 48px -12px rgba(0, 107, 52, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  position: relative;
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.75rem;
  background: var(--as-surface);
}

/* Power and volume keys. Decorative only, hence aria-hidden on the markup. */
.phone::after,
.phone::before {
  content: "";
  position: absolute;
  right: -1.5px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #4a4d4f;
}
.phone::before { top: 22%; height: 7%; }
.phone::after { top: 32%; height: 11%; }

.phone-sm { --phone-width: 13.5rem; }
.phone-lg { --phone-width: 18rem; }

/* Three phones, the middle one raised. Collapses to a scroll row on mobile. */
.phone-trio {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.phone-trio .phone-raised { margin-bottom: 2rem; }
/* On a phone, three stacked phones is four screens of scrolling for one idea.
   Swipe through them instead — all three stay reachable and the section stays
   one screen tall. */
@media (max-width: 575.98px) {
  .phone-trio {
    gap: 1rem;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 1rem;
    /* Bleed to the screen edges so a half-visible third phone shows there is
       more to swipe to. */
    margin-inline: calc(var(--bs-gutter-x, 1.5rem) * -0.5);
    padding-inline: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
  }
  .phone-trio .phone {
    flex: 0 0 auto;
    scroll-snap-align: center;
    --phone-width: 13.5rem;
  }
  .phone-trio .phone-raised { margin-bottom: 0; }
}

/* --------------------------------------------------------------------------
 * Cards
 * ------------------------------------------------------------------------ */
.card-astar {
  background: var(--as-white);
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card-astar:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -14px rgba(0, 107, 52, 0.28);
}
@media (prefers-reduced-motion: reduce) {
  .card-astar, .card-astar:hover { transition: none; transform: none; }
}

.feature-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 0.75rem;
  background: rgba(107, 254, 156, 0.22);
  color: var(--as-primary);
  margin-bottom: 1rem;
}
.feature-icon svg { width: 1.375rem; height: 1.375rem; }

/* --------------------------------------------------------------------------
 * Dark band
 * ------------------------------------------------------------------------ */
.band-dark {
  background: var(--as-gradient);
  color: #fff;
}
.band-dark h2, .band-dark h3 { color: #fff; }
.band-dark .lead, .band-dark p { color: rgba(255, 255, 255, 0.88); }
.band-dark .eyebrow {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}
.band-dark a { color: var(--as-mint-bright); }

.stat-figure {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
 * Pricing
 * ------------------------------------------------------------------------ */
.plan-card {
  background: var(--as-white);
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
}

.plan-card.plan-featured {
  border: 2px solid var(--as-primary);
  box-shadow: 0 18px 40px -22px rgba(0, 107, 52, 0.45);
}

.plan-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--as-ink);
  letter-spacing: -0.02em;
}

.plan-price small {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--as-ink-variant);
  letter-spacing: 0;
  margin-top: 0.25rem;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 0.5rem;
}
.plan-features li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.9375rem;
  color: var(--as-ink-variant);
}
.plan-features svg { flex: 0 0 auto; margin-top: 0.2rem; color: var(--as-primary); }

.badge-astar {
  background: var(--as-mint);
  color: var(--as-primary-deep);
  border-radius: 9999px;
  padding: 0.25rem 0.7rem;
}

/* Comparison table. Scrolls horizontally on phones rather than squashing. */
.table-compare { --bs-table-bg: transparent; }
.table-compare th, .table-compare td { vertical-align: middle; }
.table-compare thead th {
  border-bottom: 2px solid var(--as-outline-variant);
  color: var(--as-ink);
}
.table-compare tbody th {
  font-weight: 400;
  color: var(--as-ink-variant);
}
.table-compare .yes { color: var(--as-primary); }
.table-compare .no { color: var(--as-outline); }

/* --------------------------------------------------------------------------
 * Contact
 * ------------------------------------------------------------------------ */
.form-control:focus, .form-select:focus {
  border-color: var(--as-primary);
  box-shadow: 0 0 0 0.2rem rgba(0, 107, 52, 0.15);
}

.form-label { font-weight: 600; font-size: 0.9375rem; }

.contact-tile {
  display: block;
  padding: 1.25rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  background: var(--as-white);
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.contact-tile:hover { border-color: var(--as-primary); color: inherit; }
.contact-tile .contact-value { color: var(--as-primary); font-weight: 600; word-break: break-word; }

/* --------------------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------------------ */
.footer {
  background: var(--as-inverse);
  color: rgba(255, 255, 255, 0.72);
  padding: 3rem 0 2rem;
}
.footer h2, .footer h3 { color: #fff; font-size: 0.75rem; }
.footer a { color: rgba(255, 255, 255, 0.72); text-decoration: none; }
.footer a:hover, .footer a:focus-visible { color: #fff; text-decoration: underline; }
.footer .footer-brand { color: #fff; font-weight: 700; }
.footer hr { border-color: rgba(255, 255, 255, 0.18); opacity: 1; }

/* --------------------------------------------------------------------------
 * Accessibility
 * ------------------------------------------------------------------------ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1080;
  padding: 0.75rem 1rem;
  background: var(--as-primary);
  color: #fff;
  border-radius: 0 0 0.5rem 0;
}
.skip-link:focus {
  left: 0;
  color: #fff;
}

a:focus-visible, button:focus-visible, .contact-tile:focus-visible {
  outline: 2px solid var(--as-primary);
  outline-offset: 2px;
}

.footer a:focus-visible { outline-color: var(--as-mint); }

/* --------------------------------------------------------------------------
 * The last few rules that would otherwise be style="" attributes.
 *
 * style-src 'self' blocks inline style attributes — that is most of the value
 * of having a CSP at all, since an injected style attribute is half of a UI
 * redress attack. So there are no style attributes anywhere in this site, and
 * these three classes are what they were replaced by.
 * ------------------------------------------------------------------------ */
.footer-blurb { max-width: 28rem; }

.col-feature-name { min-width: 15rem; }

.page-center {
  min-height: 60vh;
  display: grid;
  align-items: center;
}
