/* PlowLoop marketing site + signup
   Palette sampled from logo/PlowLoop Snow Route Logo.png */
:root {
  --navy: #032753;
  --navy-800: #06306a;
  --navy-950: #011631;
  --orange: #e5640a;
  --orange-600: #c55208;
  --orange-050: #fdf1e8;
  --snow: #b4becd;
  --ice: #eef3f9;
  --ice-200: #dde6f1;
  --ink: #0e1a2b;
  --muted: #56667d;
  --line: #d6dee9;
  --white: #ffffff;
  --ok: #1d7a46;
  --danger: #b42318;

  --font-display: "Barlow", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(3, 39, 83, .06), 0 8px 24px rgba(3, 39, 83, .08);
  --shadow-lg: 0 24px 60px rgba(1, 22, 49, .35);
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy-800); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 700 1rem/1 var(--font-display); letter-spacing: .02em; text-transform: uppercase;
  padding: 15px 24px; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--orange); color: var(--white); box-shadow: 0 6px 18px rgba(229, 100, 10, .35); }
.btn-primary:hover { background: var(--orange-600); }
.btn-ghost { color: var(--white); border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,.06); }
.btn-small { padding: 10px 18px; font-size: .9rem; }
.btn[disabled] { opacity: .65; cursor: progress; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand img { height: 42px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:not(.btn):hover { color: var(--orange); }
@media (max-width: 760px) {
  .nav .nav-link { display: none; }
  .brand img { height: 34px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--white);
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(255,255,255,.10), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-950) 100%);
  padding: 88px 0 120px;
}
.hero::after { /* snowbank */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 70px;
  background: var(--white);
  clip-path: polygon(0 60%, 8% 40%, 18% 55%, 30% 30%, 44% 50%, 58% 25%, 72% 48%, 86% 30%, 100% 45%, 100% 100%, 0 100%);
}
.snow { position: absolute; inset: 0; pointer-events: none; opacity: .55; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-block; font: 700 .8rem/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase;
  color: var(--orange); background: rgba(229,100,10,.12); border: 1px solid rgba(229,100,10,.35);
  padding: 8px 12px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.4rem); font-weight: 800; font-style: italic; text-transform: none; }
.hero h1 em { font-style: italic; color: var(--orange); }
.hero .lead { font-size: 1.2rem; color: #c9d4e3; max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 28px; }
.hero-cta { margin-bottom: 12px; }
.hero-free { color: #9fb0c8; font-size: .92rem; margin: 0 0 26px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; color: #c9d4e3; font-size: .95rem; }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points svg { flex: none; color: var(--orange); }
@media (max-width: 920px) {
  .hero { padding: 56px 0 110px; }
  .hero-grid { grid-template-columns: 1fr; }
  .phone { margin: 0 auto; }
}

/* ---------- Phone mock ---------- */
.phone {
  width: 320px; max-width: 100%; border-radius: 38px; padding: 12px;
  background: #0b1424; box-shadow: var(--shadow-lg), inset 0 0 0 2px #24324a;
  transform: rotate(2deg);
}
.phone-screen { background: var(--ice); border-radius: 28px; overflow: hidden; color: var(--ink); font-size: .85rem; }
.ph-top { background: var(--navy); color: var(--white); padding: 18px 18px 14px; }
.ph-status { display: flex; justify-content: space-between; font-size: .72rem; color: #9fb0c8; margin-bottom: 10px; }
.ph-route { font: 800 1.25rem/1.1 var(--font-display); font-style: italic; }
.ph-route span { color: var(--orange); }
.ph-progress { margin-top: 10px; height: 6px; border-radius: 6px; background: rgba(255,255,255,.15); overflow: hidden; }
.ph-progress i { display: block; height: 100%; width: 28%; background: var(--orange); border-radius: 6px; }
.ph-meta { display: flex; justify-content: space-between; font-size: .72rem; color: #c9d4e3; margin-top: 6px; }
.ph-list { padding: 12px; display: grid; gap: 8px; }
.stop { background: var(--white); border-radius: 12px; padding: 10px 12px; display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; border: 1px solid var(--ice-200); }
.stop b { display: block; font-size: .86rem; }
.stop small { color: var(--muted); display: block; line-height: 1.35; }
.stop .num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .75rem; background: var(--ice-200); color: var(--navy); }
.stop.done { opacity: .6; }
.stop.done .num { background: var(--ok); color: var(--white); }
.stop.current { border: 2px solid var(--orange); box-shadow: 0 6px 16px rgba(229,100,10,.18); }
.stop.current .num { background: var(--orange); color: var(--white); }
.tag { display: inline-block; font-size: .68rem; font-weight: 600; background: var(--ice); color: var(--navy); border-radius: 6px; padding: 2px 6px; margin: 4px 4px 0 0; }
.ph-cta { margin: 4px 12px 10px; background: var(--orange); color: var(--white); text-align: center; border-radius: 12px; padding: 13px; font: 800 1rem/1 var(--font-display); letter-spacing: .04em; text-transform: uppercase; }
.ph-sync { text-align: center; font-size: .7rem; color: var(--muted); padding-bottom: 14px; }
.ph-sync i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #d89a1b; margin-right: 5px; vertical-align: 1px; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; scroll-margin-top: 72px; }
.section-alt { background: var(--ice); }
.section-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.kicker { font: 700 .8rem/1 var(--font-display); letter-spacing: .16em; text-transform: uppercase; color: var(--orange); margin-bottom: 14px; display: block; }
.section h2 { font-size: clamp(2rem, 3.8vw, 2.9rem); font-weight: 800; color: var(--navy); }
.section-head p { color: var(--muted); font-size: 1.1rem; }
@media (max-width: 760px) { .section { padding: 68px 0; } .section-head { margin-bottom: 40px; } }

/* The loop */
.loop { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; list-style: none; margin: 0; padding: 0; counter-reset: step; }
.loop::before { /* dashed route line, echoing the logo */
  content: ""; position: absolute; left: 10%; right: 10%; top: 34px; border-top: 3px dashed var(--snow); z-index: 0;
}
.loop li { position: relative; z-index: 1; text-align: center; padding: 0 6px; }
.loop .dot {
  width: 68px; height: 68px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; background: var(--white); color: var(--navy);
  border: 3px solid var(--navy); box-shadow: 0 0 0 8px var(--white);
}
.loop li:nth-child(4) .dot { background: var(--orange); border-color: var(--orange); color: var(--white); }
.loop h3 { font-size: 1.15rem; color: var(--navy); margin-bottom: .35em; }
.loop p { font-size: .93rem; color: var(--muted); margin: 0; }
.loop-return { text-align: center; margin-top: 36px; color: var(--muted); font-size: .95rem; }
.loop-return strong { color: var(--navy); }
@media (max-width: 900px) {
  .loop { grid-template-columns: 1fr; gap: 0; max-width: 460px; margin: 0 auto; }
  .loop::before { left: 33px; right: auto; top: 34px; bottom: 34px; border-top: 0; border-left: 3px dashed var(--snow); }
  .loop li { display: grid; grid-template-columns: 68px 1fr; gap: 18px; text-align: left; padding: 0 0 26px; }
  .loop .dot { margin: 0; }
}

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.feature .ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--orange-050); color: var(--orange); margin-bottom: 16px; }
.feature h3 { font-size: 1.3rem; color: var(--navy); }
.feature p { color: var(--muted); margin: 0; font-size: .97rem; }
@media (max-width: 960px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .features { grid-template-columns: 1fr; } }

/* Day one */
.dayone { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.dayone h2 { text-align: left; }
.dayone p { color: var(--muted); font-size: 1.05rem; }
.seed-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.seed-card + .seed-card { margin-top: 16px; }
.seed-card h3 { font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li { font-weight: 600; font-size: .92rem; padding: 7px 12px; border-radius: 999px; background: var(--ice); color: var(--navy); border: 1px solid var(--ice-200); }
.chips.ordered { counter-reset: g; }
.chips.ordered li::before { counter-increment: g; content: counter(g); display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 8px; border-radius: 50%; background: var(--navy); color: var(--white); font-size: .72rem; }
.seed-note { font-size: .85rem; color: var(--muted); margin: 12px 0 0; }
@media (max-width: 860px) { .dayone { grid-template-columns: 1fr; } }

/* ---------- Signup ---------- */
.signup { background: linear-gradient(170deg, var(--navy) 0%, var(--navy-950) 100%); color: var(--white); }
.signup-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.signup h2 { color: var(--white); text-align: left; }
.signup .intro p { color: #c9d4e3; font-size: 1.08rem; }
.checks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.checks li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; color: #dbe3ee; }
.checks svg { color: var(--orange); margin-top: 3px; }
@media (max-width: 920px) { .signup-grid { grid-template-columns: 1fr; gap: 36px; } }

.form-card { background: var(--white); color: var(--ink); border-radius: 18px; padding: 34px; box-shadow: var(--shadow-lg); }
.form-card h3 { font-size: 1.6rem; color: var(--navy); margin-bottom: .2em; }
.form-card .sub { color: var(--muted); font-size: .95rem; margin-bottom: 24px; }
@media (max-width: 520px) { .form-card { padding: 24px 20px; } }

fieldset { border: 0; padding: 0; margin: 0 0 8px; }
legend { font: 700 .78rem/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 0; margin-bottom: 14px; }
fieldset + fieldset { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 6px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ink); }
.field label .opt { font-weight: 400; color: var(--muted); }
.field input, .field select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--white);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--navy-800); box-shadow: 0 0 0 4px rgba(6, 48, 106, .12); }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: 6px; }
.field .err { display: none; font-size: .84rem; color: var(--danger); margin-top: 6px; font-weight: 500; }
.field.invalid input, .field.invalid select { border-color: var(--danger); }
.field.invalid .err { display: block; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 70px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; font: 600 .82rem var(--font-body); color: var(--navy-800); cursor: pointer; padding: 6px 8px; }
.meter { height: 5px; border-radius: 5px; background: var(--ice-200); margin-top: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--danger); transition: width .2s, background .2s; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-alert { display: none; border-radius: var(--radius-sm); padding: 12px 14px; font-size: .92rem; margin-bottom: 18px; }
.form-alert.show { display: block; }
.form-alert.error { background: #fdecea; color: var(--danger); border: 1px solid #f5c2bd; }
.form-alert.success { background: #e8f5ee; color: var(--ok); border: 1px solid #b8e0c8; }
.form-foot { font-size: .85rem; color: var(--muted); margin: 14px 0 0; text-align: center; }
.form-card .btn-primary { width: 100%; padding: 17px; font-size: 1.05rem; margin-top: 6px; }

.signup-done { text-align: center; padding: 12px 4px 4px; }
.signup-done:focus { outline: none; }
.signup-done .done-ico { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: #e8f5ee; color: var(--ok); }
.signup-done h3 { margin-bottom: .5em; }
.signup-done p { color: var(--muted); }
.signup-done strong { color: var(--ink); word-break: break-word; }

/* ---------- Auth pages (login, forgot, reset) ---------- */
.auth-body { background: linear-gradient(170deg, var(--navy) 0%, var(--navy-950) 100%); min-height: 100vh; display: flex; flex-direction: column; }
.auth-main { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 64px 16px 80px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-title { font-size: 1.8rem; font-weight: 800; color: var(--navy); margin-bottom: .25em; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.label-row label { margin-bottom: 6px; }
.small-link { font-size: .85rem; font-weight: 600; }
.auth-body .site-footer { margin-top: auto; }
@media (max-width: 520px) { .auth-main { padding-top: 32px; } }

/* ---------- App shell ---------- */
.app-body { background: var(--ice); min-height: 100vh; }
.app-bar { background: var(--navy); color: var(--white); position: sticky; top: 0; z-index: 50; }
.app-bar-inner { display: flex; align-items: center; gap: 18px; height: 64px; }
.app-brand img { height: 32px; width: auto; }
.app-company { font: 700 1.05rem/1.2 var(--font-display); color: #c9d4e3; padding-left: 18px; border-left: 1px solid rgba(255,255,255,.2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.app-user { margin-left: auto; display: flex; align-items: center; gap: 14px; flex: none; }
.app-user-name { font-size: .92rem; color: #c9d4e3; }
.app-logout { display: inline-flex; align-items: center; gap: 6px; background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 7px 14px; font: 600 .85rem var(--font-body); cursor: pointer; }
.app-logout:hover { border-color: var(--white); }
@media (max-width: 640px) {
  .app-user-name { display: none; }
  .app-logout span { display: none; }
  .app-logout { padding: 8px; }
  .app-company { padding-left: 12px; font-size: .95rem; }
}

.app-main { padding: 36px 0 64px; }
.app-loading { color: var(--muted); }
.app-hello { font-size: clamp(1.7rem, 3vw, 2.2rem); color: var(--navy); font-weight: 800; margin-bottom: 22px; }

.summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; max-width: 640px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; }
.stat-label { font: 700 .76rem/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stat-value { font: 800 2rem/1.15 var(--font-display); color: var(--navy); margin-top: 6px; }
.stat-note { font-size: .82rem; color: var(--muted); }
@media (max-width: 480px) { .summary { grid-template-columns: 1fr; } }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } }
.tile { position: relative; display: flex; gap: 14px; align-items: flex-start; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
a.tile:hover { border-color: var(--orange); transform: translateY(-1px); }
.tile[hidden] { display: none; }
.tile-ico { flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--orange-050); color: var(--orange); }
.tile-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tile-title { font: 700 1.2rem/1.2 var(--font-display); color: var(--navy); }
.tile-desc { font-size: .88rem; color: var(--muted); line-height: 1.45; }
.tile.is-soon { box-shadow: none; }
.tile.is-soon .tile-text { padding-right: 76px; }
.tile.is-soon .tile-ico { background: var(--ice); color: var(--snow); }
.soon { position: absolute; top: 12px; right: 12px; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--ice); border-radius: 999px; padding: 3px 8px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: #9fb0c8; padding: 48px 0 36px; font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.site-footer img { height: 36px; width: auto; }
.site-footer nav { display: flex; gap: 22px; }
.site-footer a { color: #c9d4e3; text-decoration: none; }
.site-footer a:hover { color: var(--white); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .phone { transform: none; }
}
