/*
 * Edgewise website. Same look as the app:
 * dark  = "clean pro" (graphite, teal), light = "warm editorial" (paper, amber).
 * The light amber and the faint greys are a step darker than in the app so small text
 * and buttons keep enough contrast. No inline styles: the Content-Security-Policy forbids them.
 */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1014;
  --surface: #171a20;
  --surface-2: #1e222a;
  --border: #262b34;
  --border-strong: #353b47;
  --text: #e7e9ee;
  --muted: #8b93a1;
  --faint: #7d8594;
  --accent: #2dd4bf;
  --accent-hover: #5eead4;
  --accent-fg: #042420;
  --accent-soft: rgb(45 212 191 / 0.12);
  --gain: #34d399;
  --loss: #ff7a6b;
  --warning: #fbbf24;
  --grid: #20242c;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 40px rgb(0 0 0 / 0.35);
  --glow: radial-gradient(60% 50% at 70% 0%, rgb(45 212 191 / 0.14), transparent 70%);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #fbf8f3;
  --surface: #ffffff;
  --surface-2: #f4efe7;
  --border: #e8e1d5;
  --border-strong: #d6ccbc;
  --text: #1c1a17;
  --muted: #6b645a;
  --faint: #736c60;
  --accent: #b45309;
  --accent-hover: #92400e;
  --accent-fg: #ffffff;
  --accent-soft: rgb(180 83 9 / 0.1);
  --gain: #0f8a6a;
  --loss: #d4543f;
  --warning: #b45309;
  --grid: #efe9df;
  --shadow: 0 1px 2px rgb(60 45 20 / 0.06), 0 12px 40px rgb(60 45 20 / 0.1);
  --glow: radial-gradient(60% 50% at 70% 0%, rgb(217 119 6 / 0.12), transparent 70%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus {
  top: 1rem;
}

.wrap {
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
}

/* ------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 3.6rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.brand svg {
  display: block;
}
.brand-box {
  fill: var(--accent);
}
.brand-line {
  fill: none;
  stroke: var(--accent-fg);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav {
  display: flex;
  gap: 0.25rem;
  margin-left: 0.5rem;
}
.nav a {
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}
.nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.bar-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover {
  color: var(--text);
  background: var(--surface-2);
}
[data-theme="dark"] .moon,
[data-theme="light"] .sun {
  display: none;
}

.link-quiet {
  padding: 0.4rem 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}
.link-quiet:hover {
  color: var(--text);
}

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-fg);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover {
  background: var(--accent-hover);
}
.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background: var(--surface-2);
}
.btn-small {
  min-height: 2.25rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
}
.btn-large {
  min-height: 3rem;
  padding: 0.7rem 1.4rem;
  font-size: 1rem;
}

/* ------------------------------------------------------------ hero */

.hero {
  position: relative;
  padding: 4.5rem 0 3.5rem;
  background: var(--glow);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.hero h1 {
  font-size: clamp(2.2rem, 5.2vw, 3.6rem);
  font-weight: 800;
}
.lead {
  margin-top: 1.25rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.12rem;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}
.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.88rem;
}
.hero-notes li::before {
  content: "✓";
  margin-right: 0.45rem;
  color: var(--accent);
  font-weight: 700;
}

/* The product preview: a drawn dashboard with sample data. */
.mock {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.mock-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--border-strong);
}
.mock-title {
  margin-left: 0.5rem;
  color: var(--faint);
  font-size: 0.75rem;
}
.mock-body {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}
.tile {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.tile small {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
}
.tile strong {
  font-family: "Manrope", sans-serif;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}
.gain {
  color: var(--gain);
}
.loss {
  color: var(--loss);
}
.panel {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.panel-title {
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  font-weight: 650;
}
.panel-title span {
  margin-left: 0.4rem;
  color: var(--faint);
  font-weight: 500;
}
.chart {
  display: block;
  width: 100%;
  height: auto;
}
.chart .gridline {
  stroke: var(--grid);
  stroke-width: 1;
}
.chart .zero {
  stroke: var(--border-strong);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}
.chart .wick-up {
  stroke: var(--gain);
}
.chart .wick-down {
  stroke: var(--loss);
}
.chart .wick-up,
.chart .wick-down {
  stroke-width: 1.4;
}
.chart .body-up {
  fill: var(--gain);
}
.chart .body-down {
  fill: var(--loss);
}
.chart text {
  fill: var(--faint);
  font-size: 10px;
  font-family: "Inter", sans-serif;
}
.flags {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
}
.flags li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  color: var(--muted);
}
.badge {
  flex: none;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
}
.badge-high {
  background: color-mix(in srgb, var(--loss) 16%, transparent);
  color: var(--loss);
}
.badge-med {
  background: color-mix(in srgb, var(--warning) 16%, transparent);
  color: var(--warning);
}
.meter {
  height: 0.5rem;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.meter > span {
  display: block;
  height: 100%;
  width: 62%;
  border-radius: 999px;
  background: var(--accent);
}
.meter-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
}
.mock-caption {
  margin-top: 0.75rem;
  color: var(--faint);
  font-size: 0.78rem;
  text-align: center;
}

/* ------------------------------------------------------------ sections */

.section {
  padding: 4.5rem 0;
}
.section-alt {
  background: var(--surface);
  border-block: 1px solid var(--border);
}
.section-head {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight: 800;
}
.section-head p {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 1.05rem;
}
.kicker {
  margin-bottom: 0.6rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cards {
  display: grid;
  gap: 1rem;
}
.card {
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.section-alt .card {
  background: var(--bg);
}
.card h3 {
  margin-bottom: 0.55rem;
  font-size: 1.1rem;
  font-weight: 750;
}
.card p {
  color: var(--muted);
  font-size: 0.95rem;
}
.card .who {
  display: inline-block;
  margin-bottom: 0.9rem;
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}
.card ul {
  margin: 0.8rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.card li + li {
  margin-top: 0.3rem;
}

.features {
  display: grid;
  gap: 1rem;
}
.feature {
  padding: 1.25rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
}
.feature h3 {
  margin-bottom: 0.4rem;
  font-size: 1rem;
  font-weight: 750;
}
.feature p {
  color: var(--muted);
  font-size: 0.92rem;
}
.tag-optional {
  margin-left: 0.4rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0;
  vertical-align: 0.1em;
}
.also {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.steps {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 1.4rem 1.4rem 1.4rem 4.2rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1.2rem;
  top: 1.25rem;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: "Manrope", sans-serif;
  font-weight: 800;
}
.steps h3 {
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
  font-weight: 750;
}
.steps p {
  color: var(--muted);
  font-size: 0.95rem;
}

.promises {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.promises li {
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
}
.promises strong {
  display: block;
  margin-bottom: 0.3rem;
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
  font-weight: 750;
}
.promises span {
  color: var(--muted);
  font-size: 0.93rem;
}

/* ------------------------------------------------------------ demo form */

.demo {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}
.demo-copy ul {
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}
.demo-copy li {
  display: flex;
  gap: 0.6rem;
}
.demo-copy li + li {
  margin-top: 0.5rem;
}
.demo-copy li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
}

.form-card {
  padding: 1.6rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.field label {
  font-size: 0.88rem;
  font-weight: 600;
}
.field .opt {
  color: var(--faint);
  font-weight: 500;
}
.field input,
.field textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.97rem;
}
.field textarea {
  min-height: 6.5rem;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
/* The honeypot: real visitors never see or reach it. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.small-print {
  margin-top: 0.9rem;
  color: var(--faint);
  font-size: 0.8rem;
}
.form-msg {
  margin-bottom: 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.92rem;
}
.form-msg.error {
  border-color: color-mix(in srgb, var(--loss) 45%, transparent);
  background: color-mix(in srgb, var(--loss) 10%, transparent);
  color: var(--loss);
}
.thanks {
  padding: 1rem 0;
  text-align: center;
}
.thanks h3 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}
.thanks p {
  color: var(--muted);
}
.thanks .check {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 800;
}
[hidden] {
  display: none !important;
}

/* ------------------------------------------------------------ FAQ */

.faq {
  display: grid;
  gap: 0.6rem;
  max-width: 48rem;
}
.faq details {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.faq summary {
  padding: 1rem 1.2rem;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  float: right;
  color: var(--muted);
  font-weight: 500;
}
.faq details[open] summary::after {
  content: "–";
}
.faq details p {
  padding: 0 1.2rem 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ------------------------------------------------------------ footer */

.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
}
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem 2rem;
}
.foot-company p,
.foot-company address {
  margin: 0 0 0.35rem;
  font-style: normal;
}
.foot-name {
  color: var(--text);
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
}
.foot a {
  text-decoration: none;
}
.foot a:hover {
  color: var(--text);
  text-decoration: underline;
}
/* The small print at the very bottom. */
.foot-legal {
  margin: 1.5rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 0.75rem;
  line-height: 1.5;
}

/* ------------------------------------------------------------ legal pages (terms, privacy) */

.legal {
  padding: 3.5rem 0 4.5rem;
}
.doc {
  max-width: 46rem;
}
.doc h1 {
  font-size: clamp(2rem, 4vw, 2.7rem);
}
.doc .updated {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.doc h2 {
  margin-top: 2.2rem;
  font-size: 1.2rem;
}
.doc p,
.doc li {
  color: var(--muted);
  line-height: 1.75;
}
.doc h2 + p,
.doc h2 + p + ul {
  margin-top: 0.6rem;
}
.doc ul {
  margin: 0.6rem 0 0;
  padding-left: 1.3rem;
}
.doc li + li {
  margin-top: 0.35rem;
}
.doc .contact {
  margin-top: 2.6rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.doc a {
  color: var(--accent);
}
.doc a:hover {
  text-decoration: none;
}

/* ------------------------------------------------------------ larger screens */

@media (min-width: 720px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
  .steps li {
    padding: 4.2rem 1.4rem 1.4rem;
  }
  .steps li::before {
    left: 1.4rem;
    top: 1.3rem;
  }
  .promises {
    grid-template-columns: repeat(2, 1fr);
  }
  .tiles {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 980px) {
  .hero {
    padding: 6rem 0 5rem;
  }
  .hero-grid {
    grid-template-columns: 1fr 1.08fr;
  }
  .features {
    grid-template-columns: repeat(4, 1fr);
  }
  .demo {
    grid-template-columns: 1fr 1.05fr;
  }
}

@media (max-width: 719px) {
  .nav,
  .link-quiet {
    display: none;
  }
  .section {
    padding: 3.25rem 0;
  }
  .hero {
    padding: 3rem 0 2.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
