/* Floya Labs, floya.ng
   All colours live in the custom properties below. Change --accent (and its
   dark-mode twin) to recolour the site. */

:root {
  color-scheme: light dark;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --bg: #faf6f0;
  --surface: #f2ebe1;
  --ink: #1d1915;
  --ink-soft: #5b524a;
  --line: #e3d9cc;
  --accent: #b5441b;
  --accent-hover: #963713;
  --on-accent: #ffffff;
  --accent-tint: #f6e2d6;
  --grid: rgb(29 25 21 / 0.09);
  --water: rgb(64 120 140 / 0.12);

  --radius: 1rem;
  --radius-lg: 1.5rem;
  --wrap: 72rem;
  --gutter: 1rem;
  --space-section: clamp(4.5rem, 11vw, 8rem);
}

@media (min-width: 40rem) {
  :root { --gutter: 2rem; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15120f;
    --surface: #1e1a16;
    --ink: #f2ece4;
    --ink-soft: #b3a99e;
    --line: #322b24;
    --accent: #f08a5b;
    --accent-hover: #f6a57f;
    --on-accent: #1a0f09;
    --accent-tint: #33221a;
    --grid: rgb(242 236 228 / 0.08);
    --water: rgb(120 180 200 / 0.1);
  }
}

/* Base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

svg { display: block; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover { color: var(--accent); }

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

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus { top: 1rem; color: var(--bg); }

/* Header */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.75rem;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.wordmark:hover { color: inherit; }

.wordmark-light { font-weight: 400; color: var(--ink-soft); }

.wordmark-mark { width: 1.75rem; height: 1.75rem; }
.wordmark-mark rect { fill: var(--accent); }
.wordmark-mark path { fill: none; stroke: var(--bg); stroke-width: 6; stroke-linecap: round; }
.wordmark-mark circle { fill: var(--bg); }

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.nav-link:hover { border-color: var(--accent); }

/* Buttons and links */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s;
}

.button:hover { background: var(--accent-hover); color: var(--on-accent); }

.button svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s;
}

.button:hover svg { transform: translateY(2px); }
.cta-card .button:hover svg { transform: translateX(3px); }

.text-link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 2px;
}

.text-link:hover { text-decoration-color: currentColor; }

/* Hero */

.hero { padding-block: clamp(3rem, 8vw, 6rem) var(--space-section); }

.hero-grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
}

.eyebrow,
.section-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow::before,
.section-label::before {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.lede {
  max-width: 36rem;
  margin-top: 1.5rem;
  color: var(--ink-soft);
  font-size: clamp(1.125rem, 2.2vw, 1.3rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 2.25rem;
}

.hero-visual {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.route-map { width: 100%; height: auto; }
.route-map text { font-family: var(--font-body); }

.map-grid-line { fill: none; stroke: var(--grid); stroke-width: 1; }
.map-water { fill: var(--water); }

.route-alt {
  fill: none;
  stroke: var(--ink-soft);
  stroke-opacity: 0.55;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 0.5 9;
}

.stop-alt { fill: var(--surface); stroke: var(--ink-soft); stroke-opacity: 0.7; stroke-width: 2.5; }

.route-halo,
.route-main {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-halo { stroke: var(--surface); stroke-width: 12; }
.route-main { stroke: var(--accent); stroke-width: 4; }

.depot rect { fill: var(--ink); }
.depot text {
  fill: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  text-anchor: middle;
  letter-spacing: 0.04em;
}

.stop circle { fill: var(--surface); stroke: var(--accent); stroke-width: 3; }
.stop text {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-anchor: middle;
}
.stop-last circle:not(.stop-pulse) { fill: var(--accent); }
.stop-last text { fill: var(--on-accent); }
.stop-pulse { fill: none; }

.chip rect { fill: var(--bg); stroke: var(--line); }
.chip circle { fill: var(--accent); }
.chip path { fill: none; stroke: var(--on-accent); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.chip text { fill: var(--ink); font-size: 12.5px; font-weight: 500; }

@media (prefers-reduced-motion: no-preference) {
  .route-main {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw 2.2s 0.3s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  }

  .stop,
  .chip {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: pop 0.45s var(--d, 0s) cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  }

  .stop-pulse {
    transform-box: fill-box;
    transform-origin: center;
    animation: pulse 2.4s 2.6s ease-out infinite;
  }
}

@keyframes draw { to { stroke-dashoffset: 0; } }

@keyframes pop {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  from { opacity: 0.8; transform: scale(1); }
  to { opacity: 0; transform: scale(2.4); }
}

/* Sections */

.section {
  padding-block: var(--space-section);
}

.section > .wrap { position: relative; }

.section > .wrap::before {
  content: "";
  position: absolute;
  inset: calc(-1 * var(--space-section)) 0 auto;
  border-top: 1px solid var(--line);
}

.section h2 { font-size: clamp(2.1rem, 5vw, 3.25rem); }

.split {
  display: grid;
  gap: 1.5rem 4rem;
}

/* DispatchOS */

.product-head {
  display: grid;
  gap: 1.5rem 4rem;
}

.product-tagline {
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.6rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.product-intro p:not(.product-tagline) { color: var(--ink-soft); max-width: 38rem; }

.flow {
  display: grid;
  gap: 1.75rem;
  margin: clamp(3rem, 7vw, 4.5rem) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.flow li {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1rem;
  align-items: baseline;
}

.flow h3 { font-size: 1.25rem; }
.flow p { grid-column: 2; color: var(--ink-soft); }

.flow-num {
  grid-row: span 2;
  align-self: start;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 3px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
}

/* Vertical route line between steps on small screens */
.flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(1.125rem - 1.5px);
  top: 2.25rem;
  bottom: -1.75rem;
  border-left: 3px dotted var(--accent);
  opacity: 0.5;
}

.features {
  display: grid;
  gap: 1rem;
  margin: clamp(3rem, 7vw, 4.5rem) 0 0;
  padding: 0;
  list-style: none;
}

.feature {
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feature h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.3rem;
  letter-spacing: -0.015em;
}

.feature p { color: var(--ink-soft); }

.feature-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: var(--accent-tint);
  color: var(--accent);
}

.feature-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cta-card {
  display: grid;
  gap: 1.5rem;
  justify-items: start;
  margin-top: 1rem;
  padding: clamp(1.75rem, 5vw, 2.75rem);
  border-radius: var(--radius-lg);
  background: var(--accent-tint);
}

.cta-card h3 { font-size: clamp(1.6rem, 3.5vw, 2rem); }
.cta-card p { max-width: 34rem; margin-top: 0.6rem; color: var(--ink-soft); }

/* About */

.about-body {
  max-width: 40rem;
  font-size: clamp(1.125rem, 2.2vw, 1.3rem);
  line-height: 1.6;
}

/* Contact */

.contact-intro { margin-top: 1rem; color: var(--ink-soft); }

.contact-details { font-style: normal; }

.contact-details dl {
  display: grid;
  gap: 1.75rem;
  margin: 0;
}

.contact-details dt {
  margin-bottom: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-details dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4.5vw, 2.25rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.contact-email {
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

/* Footer */

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 2rem 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

/* 404 */

.not-found {
  display: grid;
  min-height: calc(100vh - 4.75rem);
  min-height: calc(100svh - 4.75rem);
  align-content: center;
  padding-block: 4rem 6rem;
}

.not-found .route-map { width: min(100%, 18rem); margin-bottom: 2rem; }
.not-found h1 { font-size: clamp(2.5rem, 7vw, 4rem); letter-spacing: -0.03em; }
.not-found .lede { max-width: 32rem; }

.dead-end { fill: none; stroke: var(--ink-soft); stroke-width: 3; stroke-linecap: round; }

/* Larger screens */

@media (min-width: 40rem) {
  .features { grid-template-columns: repeat(2, 1fr); }

  .flow { grid-template-columns: repeat(3, 1fr); gap: 2rem; }

  .flow li {
    grid-template-columns: 1fr;
    row-gap: 0.4rem;
  }

  .flow-num { grid-row: auto; margin-bottom: 0.6rem; }
  .flow p { grid-column: 1; }

  /* Horizontal route line between steps */
  .flow li:not(:last-child)::after {
    left: 3rem;
    right: -1.25rem;
    top: calc(1.125rem - 1.5px);
    bottom: auto;
    border-left: 0;
    border-top: 3px dotted var(--accent);
  }

  .cta-card {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2rem;
  }
}

@media (min-width: 56rem) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
  .product-head,
  .split { grid-template-columns: 5fr 7fr; align-items: start; }
  .product-intro { padding-top: 2.4rem; }
  .about-body,
  .contact-details { padding-top: 2.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
