@font-face {
  font-family: 'CMU Serif';
  font-weight: 400;
  font-style: normal;
  src: url('cmunrm.woff') format('woff');
  font-display: swap;
}

@font-face {
  font-family: 'CMU Serif';
  font-weight: 700;
  font-style: normal;
  src: url('cmunbx.woff') format('woff');
  font-display: swap;
}

:root {
  --color-bg: #faf8f5;
  --color-bg-panel: #f2ede6;
  --color-text: #2c2825;
  --color-text-secondary: #5a524a;
  --color-muted: #9a8e82;
  --color-border: #e5ddd2;
  --color-accent: #b85c38;
  --color-accent-less: #8a6b5f;
  --color-accent-hover: #9c4a2c;
  --content-width: 46rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'CMU Serif', 'Latin Modern Roman', Georgia, serif;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

p {
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

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

/* ---------- Navigation ---------- */

.site-nav {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

/* Sticky nav on desktop, where a persistent menu aids wayfinding across a
   4-page site; scrolls away as normal on mobile, where screen space is
   scarcer and re-showing the hero/content sooner matters more. */
@media (min-width: 48rem) {
  .site-nav {
    position: sticky;
    top: 0;
    z-index: 10;
  }
}

.nav-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.nav-wordmark {
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--color-text);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-right: auto;
}

.nav-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  transition: color 200ms ease, border-color 200ms ease;
}

.nav-links a:hover {
  color: var(--color-text);
}

.nav-links a[aria-current='page'] {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.6rem 1.25rem;
  border-radius: 0.4rem;
  border: 1px solid transparent;
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.link-arrow {
  display: inline-block;
  text-decoration: none;
  border-bottom: 1px solid rgb(184 92 56 / 30%);
  transition: border-color 200ms ease;
}

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

/* A line of text with a link pinned to the right of it (e.g. a "learn more"
   link trailing a sentence) -- wraps the link onto its own line, still
   right-aligned, once the viewport is too narrow for both on one line. */
.split-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1.5rem;
}

/* margin-left: auto (rather than justify-content) keeps the link pinned to
   the right even when it wraps onto its own line below the text -- with
   space-between, a lone item on a wrapped line falls back to flex-start. */
.split-line .link-arrow {
  margin-left: auto;
}

/* ---------- Page shell ---------- */

main {
  flex: 1;
  width: 100%;
}

.section {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.section::after {
  content: '';
  display: table;
  clear: both;
}

.section + .section {
  padding-top: 0;
}

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

.hero {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 4.5rem 1.5rem 3rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4rem);
  margin-bottom: 0.75rem;
  display: inline-flex;
  align-items: baseline;
}

.vowel-slot {
  display: inline-block;
  overflow: hidden;
  position: relative;
  width: 0;
  transition: width 400ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

.vowel-slot::before {
  content: '\200b';
}

.vowel-slot span {
  position: absolute;
  left: 0;
  top: 0;
  transition: transform 400ms cubic-bezier(0.25, 0.1, 0.25, 1),
              opacity 300ms ease;
  transform: translateY(100%);
  opacity: 0;
  white-space: nowrap;
}

.vowel-slot span.active {
  transform: translateY(0);
  opacity: 1;
}

.vowel-slot span.exit {
  transform: translateY(-100%);
  opacity: 0;
}

.tagline {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--color-text-secondary);
  margin-bottom: 1.25rem;
}

.hero-lede {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  max-width: 34rem;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Who it's for ---------- */

.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.audience-card h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text);
}

.audience-card .icon {
  width: 1.3rem;
  height: 1.3rem;
}

.audience-card p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

/* A short list continuing a lead-in sentence -- bullets sit inside the text
   column, flush with the paragraph above, rather than hanging in the
   left-hand margin. */
.compact-list {
  list-style-position: inside;
  padding-left: 1rem;
  margin: 0.5rem 0 0;
}

.compact-list li + li {
  margin-top: 0.3rem;
}

/* ---------- Status / badges ---------- */

.status-note {
  background: var(--color-bg-panel);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
}

.status-note p {
  color: var(--color-text-secondary);
  margin: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid currentcolor;
  white-space: nowrap;
}

.status-badge--soon {
  color: var(--color-accent);
}

/* ---------- Getting started steps ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  margin-top: 1.5rem;
}

.step {
  counter-increment: step;
  position: relative;
  padding: 1.5rem 0 1.5rem 3rem;
  border-top: 1px solid var(--color-border);
}

.step::after {
  content: '';
  display: table;
  clear: both;
}

.step:first-child {
  border-top: none;
  padding-top: 0;
}

.step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1.6rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.step:first-child::before {
  top: 0.1rem;
}

.step-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.step-heading h3 {
  margin: 0;
}

.step p {
  color: var(--color-text-secondary);
}

/* Decorative graphic per step, floated top-right so the paragraph text
   wraps around it instead of the icon fighting the heading for space. */
.step-icon {
  float: right;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 0 0.75rem 1rem;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Security page ---------- */

.lede {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.5rem;
}

/* Decorative graphic per section, floated top-right so the paragraph text
   wraps around it — same convention as .step-icon on the getting-started
   page. */
.section-icon {
  float: right;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 0 0.75rem 1.5rem;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tech-panel {
  background: var(--color-bg-panel);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 2rem 1.75rem;
  margin-top: 1rem;
}

.tech-panel-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
}

.tech-panel-summary::-webkit-details-marker {
  display: none;
}

.tech-panel-summary h2 {
  margin: 0;
}

.tech-panel-chevron {
  width: 1.3rem;
  height: 1.3rem;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  transition: transform 200ms ease;
}

.tech-panel[open] .tech-panel-chevron {
  transform: rotate(90deg);
}

.tech-panel-body {
  margin-top: 1.25rem;
}

.tech-panel p,
.tech-panel li {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

.tech-panel ul {
  padding-left: 1.25rem;
  margin: 0.75rem 0;
}

.tech-panel li + li {
  margin-top: 0.6rem;
}

.diagram-figure {
  margin: 1.5rem 0;
  overflow-x: auto;
}

.diagram-figure svg {
  width: 100%;
  height: auto;
  min-width: 30rem;
}

.diagram-hint {
  display: none;
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-top: -0.75rem;
}

@media (max-width: 40rem) {
  .diagram-hint {
    display: block;
  }
}

.diagram-figure text {
  font-family: 'CMU Serif', 'Latin Modern Roman', Georgia, serif;
  fill: var(--color-text);
}

.diagram-figure .diagram-caption {
  fill: var(--color-text);
  font-size: 0.7rem;
}

.diagram-figure .diagram-box {
  fill: var(--color-bg);
  stroke: var(--color-text-secondary);
}

.diagram-figure .diagram-arrow {
  stroke: var(--color-text);
  stroke-width: 1.5;
  fill: none;
}

/* The product's own box in a concept diagram -- everything routes through it,
   so it gets the accent outline the plain boxes do not. */
.diagram-figure .diagram-box--accent {
  fill: var(--color-bg-panel);
  stroke: var(--color-accent);
  stroke-width: 2;
}

/* Human-in-the-loop connector -- dashed so it reads as oversight, distinct
   from the solid arrows that carry the actual data flow. */
.diagram-figure .diagram-arrow--dashed {
  stroke-dasharray: 4 3;
}

/* ---- Homepage concept diagram (AI <-> Frnd <-> services) ---- */

/* Wider floor than the shared default so the labels stay legible when the
   narrow-screen horizontal scroll kicks in. */
.diagram-figure--concept svg {
  min-width: 38rem;
}

.diagram-figure--concept .diagram-box {
  stroke-width: 1.5;
}

.diagram-figure--concept .diagram-caption {
  font-size: 0.72rem;
}

/* Container holding the individual service boxes -- a panel, so the boxes
   inside read as members of one cluster. */
.diagram-figure--concept .diagram-concept-group {
  fill: var(--color-bg-panel);
  stroke: var(--color-text-secondary);
  stroke-width: 1.5;
}

/* Nested 24x24 stroke icons, same convention as .icon elsewhere on the site. */
.diagram-figure--concept .diagram-concept-icon {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.diagram-figure--concept .diagram-concept-icon--person {
  stroke: var(--color-text-secondary);
}

/* ---- Security page key diagram (top-down funnel) ---- */

/* Portrait-shaped diagram: cap the width so it does not balloon to fill the
   column, and centre it instead. min-width comes from the shared
   .diagram-figure svg rule above. */
.diagram-figure--narrow svg {
  max-width: 39rem;
  display: block;
  margin: 0 auto;
}

/* Dotted separators between the "where does this live" layers (key holders,
   Frnd application, database), with a quiet label under each. */
.diagram-figure .diagram-layer-line {
  stroke: var(--color-muted);
  stroke-width: 1;
  stroke-dasharray: 2 4;
  stroke-linecap: round;
}

.diagram-figure .diagram-layer-label {
  fill: var(--color-accent-less);
  font-size: 0.78rem;
  font-weight: 700;
}

.diagram-figure .diagram-layer-label-sub {
  font-size: 0.72rem;
  font-weight: 400;
}

/* ---------- Pricing page ---------- */

.tier-note {
  margin-top: 1.5rem;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.tier-card {
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.tier-card h3 {
  margin-bottom: 0.75rem;
}

.tier-card p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

.licence-list {
  margin-top: 1rem;
  padding-left: 1.25rem;
}

.licence-list li {
  color: var(--color-text-secondary);
  margin-bottom: 0.6rem;
}

/* ---------- Icons ---------- */

.icon {
  width: 1.4rem;
  height: 1.4rem;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.icon-row {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.icon-row p {
  color: var(--color-text-secondary);
  margin: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: auto;
  padding: 2.5rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--color-border);
}

.attribution {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
}
