/* TraiLink app site. Colours and type match trailink.ca; change the look from the variables below. */
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(/assets/fonts/figtree-latin.woff2) format("woff2");
}

:root {
  --bg: #0a0c0e;
  --bg-2: #0e1114;
  --surface: #171c22;
  --surface-2: #1d232a;
  --line: #262c33;
  --line-2: #343c45;
  --text: #ffffff;
  --muted: #aab2bb;
  --soft: #d3d8dd;
  --accent: #00bf63;
  --accent-hover: #1fd47a;
  --accent-ink: #06110b;
  --accent-tint: rgba(0, 191, 99, .12);
  --danger: #ff5c5c;
  --radius: 20px;
  --max: 1160px;
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 500 1.0625rem/1.65 var(--font); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.08; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: .6rem 1rem; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }

/* Type */
h1 { font-size: clamp(2.5rem, 6.6vw, 4.6rem); font-weight: 800; letter-spacing: -.01em; text-transform: uppercase; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.01em; text-transform: uppercase; }
h3 { font-size: 1.25rem; font-weight: 750; }
.eyebrow { font-size: .8rem; letter-spacing: .27em; text-transform: uppercase; color: var(--accent); font-weight: 800; margin-bottom: 1rem; }
.lead { font-size: clamp(1.1rem, 2vw, 1.28rem); color: var(--muted); max-width: 40rem; }
.accent { color: var(--accent); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: .85rem 1.6rem; border-radius: 999px; font: 700 1rem/1 var(--font); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s, background .15s, border-color .15s, color .15s; }
.btn:hover { transform: translateY(-2px); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-outline { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn-outline:hover { background: var(--accent-tint); color: var(--accent-hover); }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: rgba(255,255,255,.03); }
.btn-ghost:hover { border-color: var(--accent); color: #fff; }
.btn-sm { padding: .6rem 1.1rem; font-size: .92rem; }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }
.ext::after { content: "↗"; font-weight: 700; font-size: .9em; }
/* Official store badges: use the artwork unmodified. Google's PNG carries 41px of clear space
   around a 564x168 badge, so it is scaled to match the Apple badge's height and offset by that margin. */
.badges { --badge-h: 48px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.badge { display: inline-block; line-height: 0; border-radius: 9px; transition: transform .15s; }
.badge:hover { transform: translateY(-2px); }
.badge img { height: var(--badge-h); width: auto; }
.badge-google img { height: calc(var(--badge-h) * 250 / 168); margin: calc(var(--badge-h) * -41 / 168); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn-row.center { justify-content: center; }
.pt0 { padding-top: 0; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(10,12,14,.85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 24px; min-height: 72px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-logo { height: 30px; width: auto; }
.brand-by { padding-left: 14px; border-left: 1px solid var(--line-2); color: var(--muted); font-size: .78rem; line-height: 1.2; font-weight: 600; }
.brand-by b { display: block; color: var(--soft); font-weight: 750; }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; padding: .5rem .9rem; border-radius: 999px; font-weight: 650; font-size: .98rem; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.07); }
@media (max-width: 720px) {
  .bar { gap: 8px 12px; padding: 10px 0; }
  .brand-logo { height: 26px; }
  .brand-by { display: none; }
  .site-cta { margin-left: auto; }
  .nav { order: 3; width: 100%; margin: 0; justify-content: space-between; }
  .nav a { flex: 1; text-align: center; }
}

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section.alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .btn, .badge { transition: none; }
}
html:not(.js) .reveal { opacity: 1; transform: none; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 7vw, 5rem);
  background: radial-gradient(900px 560px at 82% 10%, rgba(0,191,99,.16), transparent 62%), var(--bg); }
.hero::before { content: ""; position: absolute; inset: 0; background: url(/assets/img/topo.svg) center / cover no-repeat; pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero .lead { margin-bottom: 2rem; }
.app-id { display: inline-flex; align-items: center; gap: 14px; margin-bottom: 1.6rem; }
.app-id img { width: 60px; height: 60px; border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.app-id span { color: var(--muted); font-size: .95rem; line-height: 1.35; }
.app-id strong { display: block; color: #fff; font-size: 1.05rem; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 2rem 0 0; padding: 0; list-style: none; }
.pills li { padding: .45rem 1rem; border: 1px solid var(--line-2); border-radius: 999px; color: var(--soft); font-size: .9rem; background: rgba(255,255,255,.02); }
.phone-shot { position: relative; justify-self: center; width: min(340px, 78vw); }
.phone-shot::before { content: ""; position: absolute; inset: 12% -10% 6%; background: radial-gradient(closest-side, rgba(0,191,99,.28), transparent); filter: blur(10px); z-index: -1; }
.phone-shot img { width: 100%; height: auto; filter: drop-shadow(0 40px 60px rgba(0,0,0,.55)); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .phone-shot { width: min(270px, 66vw); }
}

/* Notice strip pointing to trailink.ca */
.notice { display: flex; align-items: center; gap: 18px 28px; flex-wrap: wrap; padding: 1.2rem 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.notice p { margin: 0; flex: 1 1 22rem; color: var(--soft); }
.notice strong { color: #fff; }

/* App features */
.features { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.features .phone-shot { width: min(320px, 70vw); }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; }
.feature-list h3 { margin-bottom: .35rem; font-size: 1.12rem; }
.feature-list p { color: var(--muted); margin: 0; font-size: 1rem; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr; } .features .phone-shot { order: 2; } }
@media (max-width: 560px) { .feature-list { grid-template-columns: 1fr; } }
.icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent); margin-bottom: .9rem; }
.icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--accent); color: var(--accent); font-weight: 800; margin-bottom: 1rem; }
.steps p { color: var(--muted); margin-bottom: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card p { color: var(--muted); margin-bottom: 0; }
.card p + p { margin-top: .8rem; }
.card h2 { font-size: 1.35rem; text-transform: none; letter-spacing: 0; }
.card h3 { margin-bottom: .4rem; }

/* Bands and CTAs */
.band { position: relative; overflow: hidden; border-radius: 32px; padding: clamp(2.2rem, 6vw, 4.5rem); border: 1px solid var(--line); background: radial-gradient(700px 380px at 100% 0%, rgba(0,191,99,.18), transparent 62%), var(--surface); }
.band::before { content: ""; position: absolute; inset: 0; background: url(/assets/img/topo.svg) center / cover; opacity: .8; pointer-events: none; }
.band > * { position: relative; }
.band h2 { max-width: 18ch; }
.band p { color: var(--soft); max-width: 36rem; font-size: 1.12rem; }
.band-split { display: grid; grid-template-columns: 1.3fr .7fr; gap: 32px; align-items: center; }
.band-split picture { justify-self: center; }
.band-split .device { width: auto; height: 340px; filter: drop-shadow(0 30px 40px rgba(0,0,0,.6)); }
@media (max-width: 760px) { .band-split { grid-template-columns: 1fr; gap: 20px; } .band-split picture { order: -1; justify-self: start; } .band-split .device { height: 190px; } }

/* About */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.about p { color: var(--muted); }
.about .card p { color: var(--muted); }
.about dl { margin: 0; display: grid; gap: 1.1rem; }
.about dt { font-weight: 750; color: #fff; }
.about dd { margin: .2rem 0 0; color: var(--muted); }
@media (max-width: 800px) { .about { grid-template-columns: 1fr; } }

/* Page hero (inner pages) */
.page-hero { position: relative; overflow: hidden; padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem); background: radial-gradient(800px 360px at 85% 0%, rgba(0,191,99,.13), transparent 60%), var(--bg); border-bottom: 1px solid var(--line); }
.page-hero::before { content: ""; position: absolute; inset: 0; background: url(/assets/img/topo.svg) center / cover; pointer-events: none; }
.page-hero > * { position: relative; }
.page-hero h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 860px; }
.faq-group + .faq-group { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; transition: border-color .15s; }
.faq details[open] { border-color: var(--line-2); }
.faq summary { cursor: pointer; list-style: none; padding: 1.2rem 1.5rem; font-weight: 750; font-size: 1.1rem; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.6rem; line-height: 1; color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 1.5rem 1.3rem; color: var(--muted); }
.faq .answer p:last-child { margin-bottom: 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.contact-cards { display: grid; gap: 18px; }
.contact-cards a.mail { font-weight: 750; font-size: 1.1rem; word-break: break-all; }
.form { display: grid; gap: 18px; }
.form label { display: grid; gap: 7px; font-weight: 650; font-size: .95rem; }
.form input, .form select, .form textarea { font: inherit; font-weight: 500; color: var(--text); background: var(--bg-2); border: 1.5px solid var(--line); border-radius: 8px; padding: .8rem 1rem; width: 100%; }
.form textarea { resize: vertical; min-height: 150px; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(0,191,99,.2); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { min-height: 1.5em; margin: 0; font-weight: 650; }
.status.ok { color: var(--accent); } .status.err { color: var(--danger); }
.fine { color: var(--muted); font-size: .9rem; margin: 0; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* Legal / prose */
.prose { font-size: 1.04rem; }
.prose h2 { font-size: 1.5rem; text-transform: none; letter-spacing: 0; margin: 2.4rem 0 .7rem; scroll-margin-top: 90px; }
.prose h3 { font-size: 1.15rem; margin: 1.6rem 0 .5rem; }
.prose p, .prose li { color: var(--soft); }
.prose ul { padding-left: 1.3rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose .stamp { color: var(--muted); font-style: italic; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.4rem; margin-bottom: 2rem; }
.toc summary { cursor: pointer; font-weight: 750; }
.toc ol { columns: 2; column-gap: 32px; margin: 1rem 0 .4rem; padding-left: 1.2rem; }
.toc li { break-inside: avoid; margin-bottom: .3rem; }
@media (max-width: 640px) { .toc ol { columns: 1; } }

/* Footer */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--line); margin-top: 0; }
.foot { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 32px; padding: 3.5rem 0 2.5rem; }
.foot-brand .brand-logo { height: 32px; }
.foot-brand p { color: var(--muted); margin: 1.1rem 0 0; max-width: 22rem; font-size: .95rem; }
.foot-col { display: grid; gap: .55rem; align-content: start; }
.foot-col h2 { font-size: .78rem; letter-spacing: .22em; margin: 0 0 .6rem; color: var(--muted); }
.foot-col a { color: var(--text); text-decoration: none; }
.foot-col a:hover { color: var(--accent); text-decoration: underline; }
.trademarks { padding-bottom: 2.4rem; color: var(--muted); font-size: .8rem; opacity: .8; }
.legal-line + .trademarks { margin-top: -1.4rem; }
.legal-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 1.4rem 0 2.4rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
@media (max-width: 860px) { .foot { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 460px) { .foot { grid-template-columns: 1fr; } }

/* 404 */
.lost { text-align: center; padding: clamp(5rem, 14vw, 9rem) 0; }
.lost p { margin-inline: auto; }
