/* Daggle marketing page. Hand-written, no build step, no external assets.
   Tokens, faces and components mirror web.daggle-app (src/styles.css) so
   the site and the app read as one product: near-white slate background,
   white bordered panels, slate-blue accent, DM Sans body, Manrope headings. */

@font-face {
  font-family: "DM Sans";
  src: url("fonts/dm-sans.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --accent: #405167;
  --accent-dark: #334357;
  --link: #466c9e;
  --tint: #ecf1f6;
  --border: #c9d0da;
  --muted: #58697f;
  --ink: #2d3641;
  --bg: #f6f8fa;
  --paper: #fff;
  --ok: #2f7a4f;
  --ok-soft: #e6f3ea;
  --void: #a33b3b;
  --void-soft: #fbeaea;
  color-scheme: light;
}

* { box-sizing: border-box; }
/* Author display rules below must not override the hidden attribute. */
[hidden] { display: none !important; }

html {
  font-family: "DM Sans", system-ui, sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.6;
}
body {
  margin: 0;
  max-width: 66rem;
  padding: 0 1.5rem;
  margin-inline: auto;
}
p { margin: 0; }
h1, h2, h3 {
  font-family: Manrope, system-ui, sans-serif;
  margin: 0;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 5.5vw, 3.4rem); line-height: 1.1; letter-spacing: -0.035em; }
h2 { font-size: 1.35rem; line-height: 1.3; }
a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
::selection { background: #dce6f3; }
button, input { font: inherit; }
button, a, input { outline-offset: 4px; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid #426793; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }
svg { flex-shrink: 0; }

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 100;
  background: var(--paper);
  padding: 12px;
}
.skip-link:focus { top: 12px; }

/* Shared components lifted from the app */
.panel {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.3;
  min-height: 42px;
  text-decoration: none;
}
.button:hover:not(:disabled) { opacity: 0.9; }
.button.secondary { background: var(--paper); border-color: #8797ac; color: var(--accent); }
.button.small { font-size: 0.8125rem; min-height: 34px; padding: 6px 12px; }
.count {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 5px;
  background: #d5e0ed;
  color: #30445e;
  font-size: 0.75rem;
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 500;
  letter-spacing: 0;
  vertical-align: middle;
}
.text-button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Masthead */
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: Manrope, sans-serif;
  font-size: 27px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1.5px;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
}
.brand > svg { transform: rotate(180deg); color: var(--accent); }
.brand-dot { color: var(--link); }
.badge {
  background: var(--tint);
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Hero: centred, full width */
.hero {
  padding: 4.5rem 0 3.5rem;
  max-width: 46rem;
  margin-inline: auto;
  text-align: center;
}
.hero h1 em { font-style: normal; color: var(--link); }
/* Each letter of "chaotic" jiggles on its own rhythm; the offsets are tiny
   so the word stays legible and the line never reflows. */
.chaotic { display: inline-block; white-space: nowrap; }
.chaotic > span > span {
  display: inline-block;
  animation: jiggle 1.1s ease-in-out infinite alternate;
  will-change: transform;
}
.chaotic > span > span:nth-child(1) { animation-duration: 0.9s; animation-delay: -0.2s; }
.chaotic > span > span:nth-child(2) { animation-duration: 1.3s; animation-delay: -0.7s; animation-direction: alternate-reverse; }
.chaotic > span > span:nth-child(3) { animation-duration: 1.0s; animation-delay: -0.4s; }
.chaotic > span > span:nth-child(4) { animation-duration: 1.4s; animation-delay: -1.1s; animation-direction: alternate-reverse; }
.chaotic > span > span:nth-child(5) { animation-duration: 0.8s; animation-delay: -0.3s; }
.chaotic > span > span:nth-child(6) { animation-duration: 1.2s; animation-delay: -0.9s; animation-direction: alternate-reverse; }
.chaotic > span > span:nth-child(7) { animation-duration: 1.05s; animation-delay: -0.5s; }
@keyframes jiggle {
  0%   { transform: translate(-0.02em, 0.03em) rotate(-2.5deg); }
  35%  { transform: translate(0.02em, -0.02em) rotate(1.5deg); }
  70%  { transform: translate(-0.01em, -0.03em) rotate(-1deg); }
  100% { transform: translate(0.025em, 0.02em) rotate(2.5deg); }
}
/* "traceable" carries a trace line under the word: a faint path with a
   brighter segment travelling along it continuously, like following a route. */
.traceable { position: relative; display: inline-block; }
.traceable .trace {
  position: absolute;
  left: 0;
  bottom: -0.03em;
  width: 100%;
  height: auto;
  overflow: visible;
}
.traceable .trace path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3.5;
  stroke-linecap: round;
}
.traceable .trace-base { opacity: 0.3; }
.traceable .trace-pulse {
  stroke-dasharray: 0.3 0.7;
  stroke-dashoffset: 1;
  animation: trace 2.6s linear infinite;
}
@keyframes trace {
  from { stroke-dashoffset: 1; }
  to   { stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .chaotic > span > span { animation: none; }
  .traceable .trace-pulse { animation: none; stroke-dasharray: none; }
}
.pitch {
  margin-top: 1.5rem;
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 40rem;
  margin-inline: auto;
  text-wrap: balance;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}
.hero-note {
  margin-top: 1rem;
  text-wrap: balance;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* Vignette: the signed / void clause example */
.vignette {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
  margin-bottom: 4rem;
}
.vignette-doc { padding: 24px; }
.vignette-title {
  font-family: Manrope, sans-serif;
  font-weight: 750;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.clause {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0.35rem 0;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
}
.clause-number {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.clause p { line-height: 1.5; }
.clause-changed { background: var(--tint); margin-inline: -24px; padding-inline: 24px; }
/* Conventional diff colouring: removed text red and struck through, added text green. */
.clause del { color: #8f2a2a; background: #fbdada; text-decoration: line-through; padding: 0 3px; border-radius: 3px; }
.clause ins { color: #1f5e3a; background: #d4efdd; text-decoration: none; padding: 0 3px; border-radius: 3px; }
.sig {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8125rem;
  font-weight: 600;
  width: fit-content;
  border-radius: 5px;
  padding: 2px 8px 2px 6px;
}
.sig-ok { color: var(--ok); background: var(--ok-soft); }
.sig-void { color: var(--void); background: var(--void-soft); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.vignette-decision {
  background: var(--tint);
  border-left: 1px solid var(--border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.9rem;
}
.appointment {
  max-width: 24rem;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #f5f8fb;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
}
.appointment-icon { flex-shrink: 0; }
.appointment-body { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.appointment-title {
  font-family: Manrope, sans-serif;
  font-weight: 750;
  font-size: 1rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.appointment-meta { color: var(--ink); font-size: 0.8125rem; line-height: 1.4; }
/* Illustrative only: styled as a link to the meeting minutes, goes nowhere. */
.appointment-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.decision { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.5rem; }
.decision-title {
  font-family: Manrope, sans-serif;
  font-weight: 750;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.decision-meta { color: var(--muted); line-height: 1.5; }

/* Pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
  margin-bottom: 4rem;
}
.pillars h2 { margin-bottom: 0.75rem; }
.pillars p { color: var(--muted); font-size: 0.9375rem; }

/* Two questions */
.questions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 4rem;
}
.questions-intro p { margin-top: 0.75rem; color: var(--muted); }
.question-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.question-list li { display: grid; gap: 0.4rem; }
.question-list strong { font-family: Manrope, sans-serif; font-weight: 750; letter-spacing: -0.015em; font-size: 1.05rem; }
.question-list span { color: var(--muted); font-size: 0.9375rem; }

/* Audience */
.who {
  margin-bottom: 4rem;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  padding: 36px;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.who-text { min-width: 0; }
.who h2 { color: #fff; margin-bottom: 0.75rem; }
.who p { color: #d7e0ea; max-width: 46rem; }
.who-icon { width: 120px; height: 120px; flex-shrink: 0; color: #d7e0ea; }
.who-icon-signed { stroke: #fff; stroke-width: 3.5; }

/* Register interest */
.interest {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 3rem;
  scroll-margin-top: 2rem;
}
.interest-intro p { margin-top: 0.75rem; color: var(--muted); }
.interest-small { font-size: 0.875rem; }
#interest-form { display: flex; flex-direction: column; gap: 0.75rem; }
.field-label { font-weight: 600; font-size: 0.9375rem; }
#interest-email {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--paper);
  color: inherit;
}
#interest-email:focus-visible { outline-offset: 0; border-color: #426793; }
.interest-consent { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.9375rem; }
.interest-consent input { margin-top: 3px; }
#interest-form .button { align-self: flex-start; }
.interest-status { font-size: 0.9375rem; min-height: 1.5em; color: var(--muted); }
.interest-status[data-state="success"] { color: var(--ok); }
.interest-status[data-state="error"] { color: var(--void); }
.interest-status:empty { display: none; }
.interest-unavailable {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  color: var(--muted);
  margin-bottom: 3rem;
}

/* Privacy notice dialog */
#interest-dialog {
  width: min(640px, calc(100% - 32px));
  max-height: 85dvh;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  color: var(--ink);
  background: var(--paper);
}
#interest-dialog::backdrop { background: rgba(45, 54, 65, 0.45); }
.interest-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
#interest-terms { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.9rem; line-height: 1.55; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
  display: grid;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}
.beta-signin { font-size: 1rem; color: var(--ink); margin-bottom: 0.75rem; }

@media (max-width: 760px) {
  .hero { padding-top: 3rem; }
  .vignette, .questions, .interest { grid-template-columns: 1fr; }
  .vignette-decision { border-left: 0; border-top: 1px solid var(--border); }
  .who { padding: 24px; flex-direction: column-reverse; align-items: flex-start; gap: 1.25rem; }
  .who-icon { width: 72px; height: 72px; }
  .brand { font-size: 24px; }
  .brand > svg { width: 21px; }
}
