/* ==========================================================================
   Pipefox — design system
   Palette: deep-water teal base, puffin-beak marigold + coral accents,
   sea-glass chalk paper. Type: Bricolage Grotesque display / Instrument Sans text.
   ========================================================================== */

:root {
  --ink:      #0B2C36;
  --ink-2:    #123F4C;
  --ink-3:    #1B5364;
  --sea:      #17817F;
  --coral:    #FF5E3A;
  --marigold: #FFB100;
  --chalk:    #F1F4F0;
  --paper:    #FFFFFF;
  --mute:     #5C7480;
  --mute-2:   #8CA3AC;
  --line:     #D8E0DC;
  --line-dk:  rgba(241,244,240,.16);

  --display: "Bricolage Grotesque", "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --text: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0:  1rem;
  --step-1:  1.1875rem;
  --step-2:  1.5rem;
  --step-3:  1.9375rem;
  --step-4:  2.5rem;
  --step-5:  3.25rem;
  --step-6:  4.125rem;

  --gut: 1.5rem;
  --max: 1180px;
  --r: 14px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: var(--text);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.028em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); letter-spacing: -0.02em; }
h4 { font-size: var(--step-1); letter-spacing: -0.015em; }
p  { margin: 0 0 1em; max-width: 68ch; }

a { color: var(--ink); text-decoration-color: var(--mute-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--coral); }
img, svg { max-width: 100%; height: auto; display: block; }

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

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gut); }
.lede { font-size: var(--step-1); color: var(--mute); max-width: 58ch; }
.dark .lede, .hero .lede { color: rgba(241,244,240,.76); }
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--coral); color: #fff;
  padding: .7rem 1.1rem; z-index: 200; border-radius: 0 0 8px 0; font-weight: 600;
}
.skip:focus { left: 0; }

/* ---------- The ledge: recurring structural rule ------------------------- */
/* A hairline with a beak-coloured tick. Marks the start of a content band
   and encodes which channel/topic the band belongs to. */
.ledge {
  display: flex; align-items: center; gap: .75rem;
  border-top: 1px solid var(--line);
  padding-top: .8rem; margin-bottom: 2.2rem;
  font-size: var(--step--1); font-weight: 600; color: var(--mute); max-width: none;
}
.ledge::before {
  content: ""; width: 22px; height: 7px; flex: none;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  background: var(--marigold);
}
.ledge.is-coral::before { background: var(--coral); }
.ledge.is-sea::before { background: var(--sea); }
.dark .ledge { border-color: var(--line-dk); color: var(--mute-2); }

/* ---------- Buttons ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--text); font-weight: 600; font-size: var(--step-0);
  padding: .78rem 1.3rem; border-radius: 999px; border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer; transition: background-color .18s, color .18s, border-color .18s;
}
.btn-primary { background: var(--coral); color: #fff; }
.btn-primary:hover { background: #E54826; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.dark .btn-ghost, .hero .btn-ghost { border-color: rgba(241,244,240,.34); color: var(--chalk); }
.dark .btn-ghost:hover, .hero .btn-ghost:hover { border-color: var(--chalk); background: rgba(241,244,240,.08); }
.btn-lg { padding: .95rem 1.7rem; font-size: var(--step-1); }

/* ---------- Header ------------------------------------------------------- */
.site-head {
  position: sticky; top: 0; z-index: 100;
  background: var(--ink); color: var(--chalk);
  border-bottom: 1px solid var(--line-dk);
}
.site-head a { color: var(--chalk); text-decoration: none; }
.head-bar { display: flex; align-items: center; gap: 1.6rem; height: 68px; }
.brand { display: flex; align-items: center; flex: none; }
.brand svg, .brand img { height: 30px; width: auto; }
.nav { display: flex; align-items: center; gap: 1.4rem; margin-left: .4rem; }
.nav > a, .nav-trigger {
  font-size: var(--step--1); font-weight: 600; color: rgba(241,244,240,.84);
  background: none; border: 0; font-family: var(--text); cursor: pointer;
  padding: .4rem 0; display: inline-flex; align-items: center; gap: .35rem;
}
.nav > a:hover, .nav-trigger:hover { color: var(--marigold); }
.nav-trigger svg { width: 10px; height: 10px; }
.head-actions { margin-left: auto; display: flex; align-items: center; gap: .8rem; }
.head-actions .btn { padding: .55rem 1.1rem; font-size: var(--step--1); }

.has-menu { position: relative; }
.menu {
  position: absolute; top: calc(100% + 12px); left: -1rem; min-width: 320px;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--r); padding: .6rem; box-shadow: 0 18px 40px rgba(11,44,54,.18);
  display: none;
}
.has-menu[data-open="true"] .menu { display: block; }
.menu a {
  display: block; color: var(--ink); padding: .55rem .7rem; border-radius: 9px;
  font-size: var(--step--1); font-weight: 600;
}
.menu a:hover { background: var(--chalk); }
.menu a span { display: block; font-weight: 400; color: var(--mute); font-size: .8125rem; }
.menu-head {
  font-size: .75rem; font-weight: 700; color: var(--mute); padding: .5rem .7rem .2rem;
}

.burger { display: none; margin-left: auto; background: none; border: 0; padding: .5rem; cursor: pointer; }
.burger span { display: block; width: 22px; height: 2px; background: var(--chalk); margin: 4px 0; }

@media (max-width: 900px) {
  .nav, .head-actions { display: none; }
  .burger { display: block; }
  .site-head[data-nav="open"] .nav {
    display: flex; flex-direction: column; align-items: flex-start; gap: .2rem;
    padding: 1rem 0 1.6rem; width: 100%;
  }
  .site-head[data-nav="open"] .head-actions { display: flex; padding-bottom: 1.5rem; }
  .site-head[data-nav="open"] .head-bar { flex-wrap: wrap; height: auto; }
  .site-head[data-nav="open"] .menu { position: static; display: block; min-width: 0; width: 100%; margin: .4rem 0; }
  .site-head[data-nav="open"] .nav-trigger { display: none; }
}

/* ---------- Hero --------------------------------------------------------- */
.hero { background: var(--ink); color: var(--chalk); padding: 4.5rem 0 5rem; overflow: hidden; }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 4.125rem); max-width: 15ch; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3.5rem; align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 1rem; }
.hero-note { font-size: var(--step--1); color: var(--mute-2); }
.hero-figure { position: relative; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; } }

/* trust strip */
.trust { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.faces { display: flex; }
.faces img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--ink); margin-left: -10px; }
.faces img:first-child { margin-left: 0; }
.trust p { margin: 0; font-size: var(--step--1); color: rgba(241,244,240,.78); max-width: 30ch; }
.stars { color: var(--marigold); font-weight: 700; font-size: var(--step--1); }

/* ---------- Sections ----------------------------------------------------- */
.band { padding: 5rem 0; }
.band-chalk { background: var(--chalk); }
.band-ink { background: var(--ink); color: var(--chalk); }
.band-ink h1, .band-ink h2, .band-ink h3 { color: var(--chalk); }
.band-ink a { color: var(--chalk); }
.band-tight { padding: 3.2rem 0; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
.split-wide { grid-template-columns: 1.15fr .85fr; }
.split.flip .split-media { order: -1; }
@media (max-width: 880px) {
  .split, .split-wide { grid-template-columns: 1fr; gap: 2rem; }
  .split.flip .split-media { order: 0; }
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (max-width: 880px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.grid-3 > *, .grid-2 > * { height: 100%; }

/* ---------- Feature blocks ---------------------------------------------- */
.feature {
  border-top: 1px solid var(--line); padding-top: 1.4rem;
}
.dark .feature, .band-ink .feature { border-color: var(--line-dk); }
.feature h3 { margin-bottom: .35rem; }
.feature p { color: var(--mute); font-size: var(--step--1); margin: 0; }
.band-ink .feature p { color: var(--mute-2); }

.linkrow { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; font-size: var(--step--1); color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--marigold); padding-bottom: 2px; }
.linkrow:hover { border-color: var(--coral); }
.band-ink .linkrow { color: var(--chalk); }

/* ---------- Steps (real sequence only) ---------------------------------- */
.steps { counter-reset: s; display: grid; gap: 1.4rem; }
.step { display: grid; grid-template-columns: 2.4rem 1fr; gap: 1rem; align-items: start; }
.step::before {
  counter-increment: s; content: counter(s);
  font-family: var(--display); font-weight: 700; font-size: var(--step-1);
  color: var(--coral); border-top: 2px solid var(--coral); padding-top: .3rem;
}
.step h4 { margin-bottom: .2rem; }
.step p { margin: 0; color: var(--mute); font-size: var(--step--1); }

/* ---------- Quotes ------------------------------------------------------- */
.quote {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.8rem; display: flex; flex-direction: column; gap: 1.2rem;
}
.band-chalk .quote { background: var(--paper); }
.quote blockquote { margin: 0; font-size: var(--step-0); line-height: 1.55; }
.quote figcaption { display: flex; align-items: center; gap: .7rem; margin-top: auto; }
.quote img { width: 46px; height: 46px; border-radius: 50%; flex: none; }
.quote cite { font-style: normal; font-weight: 600; font-size: var(--step--1); display: block; }
.quote small { color: var(--mute); font-size: .8125rem; }

/* ---------- Logo wall ---------------------------------------------------- */
.logowall { display: flex; flex-wrap: wrap; gap: 2.4rem 3rem; align-items: center; justify-content: center; }
.logowall img { height: 26px; width: auto; }


/* ---------- Pricing ------------------------------------------------------ */
.toggle { display: inline-flex; background: var(--chalk); border-radius: 999px; padding: 4px; gap: 2px; border: 1px solid var(--line); }
.band-chalk .toggle { background: var(--paper); }
.toggle button {
  border: 0; background: none; font-family: var(--text); font-weight: 600; font-size: var(--step--1);
  padding: .5rem 1.1rem; border-radius: 999px; cursor: pointer; color: var(--mute);
}
.toggle button[aria-pressed="true"] { background: var(--ink); color: var(--chalk); }
.save { font-size: var(--step--1); color: var(--sea); font-weight: 600; margin-left: .8rem; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; max-width: 460px; } }
.plan {
  border: 1px solid var(--line); border-radius: var(--r); padding: 1.9rem; background: var(--paper);
  display: flex; flex-direction: column; height: 100%;
}
.plan-featured { border: 2px solid var(--ink); position: relative; }
.tag {
  position: absolute; top: -.75rem; left: 1.9rem; background: var(--marigold); color: var(--ink);
  font-size: .75rem; font-weight: 700; padding: .2rem .7rem; border-radius: 999px;
}
.price { font-family: var(--display); font-weight: 700; font-size: var(--step-4); letter-spacing: -.03em; margin: 1rem 0 .2rem; }
.price small { font-family: var(--text); font-size: var(--step--1); font-weight: 500; color: var(--mute); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: .55rem; }
.plan li { font-size: var(--step--1); padding-left: 1.5rem; position: relative; color: var(--ink-2); }
.plan li::before {
  content: ""; position: absolute; left: 0; top: .48em; width: 11px; height: 6px;
  border-left: 2px solid var(--sea); border-bottom: 2px solid var(--sea); transform: rotate(-45deg);
}
.plan li.head { font-weight: 700; padding-left: 0; color: var(--ink); }
.plan li.head::before { display: none; }
.plan .btn { margin-top: 1.4rem; width: 100%; }

/* ---------- Tables ------------------------------------------------------- */
.tbl { width: 100%; border-collapse: collapse; font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { text-align: left; padding: .8rem .9rem; border-bottom: 1px solid var(--line); }
.tbl th { font-weight: 700; }
.tbl tbody tr:hover { background: var(--chalk); }
.scroll-x { overflow-x: auto; }

/* ---------- FAQ ---------------------------------------------------------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 1.15rem 0; font-weight: 600; font-size: var(--step-1);
  list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center;
  font-family: var(--display); letter-spacing: -.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; color: var(--coral); line-height: 1; flex: none; }
.faq details[open] summary::after { content: "\2013"; }
.faq details > div { padding-bottom: 1.2rem; }
.faq p { color: var(--mute); margin: 0 0 .8rem; }

/* ---------- Cards / lists ------------------------------------------------ */
.card {
  border: 1px solid var(--line); border-radius: var(--r); padding: 1.6rem; background: var(--paper);
  display: flex; flex-direction: column; gap: .5rem;
}
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--mute); font-size: var(--step--1); }
.card-link { text-decoration: none; transition: border-color .18s; }
.card-link:hover { border-color: var(--ink); }

.chip {
  display: inline-block; font-size: .75rem; font-weight: 700; padding: .2rem .6rem;
  border-radius: 999px; background: var(--marigold); color: var(--ink);
}
.chip-sea { background: rgba(23,129,127,.14); color: var(--sea); }

.itile { display: flex; flex-direction: row; align-items: center; gap: .9rem; text-decoration: none; }
.itile img { width: 44px; height: 44px; border-radius: 11px; flex: none; }
mark { background: var(--marigold); color: var(--ink); padding: 0 .3em; border-radius: 3px; }
.itile b { display: block; font-size: var(--step-0); }
.itile small { color: var(--mute); font-size: .8125rem; }

/* ---------- Prose (legal / blog) ---------------------------------------- */
.prose { max-width: 68ch; }
.prose h2 { font-size: var(--step-2); margin-top: 2.4rem; }
.prose h3 { font-size: var(--step-1); margin-top: 1.8rem; }
.prose ul, .prose ol { padding-left: 1.2rem; color: var(--ink-2); }
.prose li { margin-bottom: .45rem; }
.prose table { margin: 1.5rem 0; }

/* ---------- CTA ---------------------------------------------------------- */
.cta { background: var(--ink); color: var(--chalk); padding: 4.5rem 0; text-align: center; }
.cta h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); margin-inline: auto; max-width: 18ch; }
.cta p { margin-inline: auto; color: var(--mute-2); }
.cta .btn { margin-top: 1.2rem; }

/* ---------- Footer ------------------------------------------------------- */
.site-foot { background: var(--ink); color: var(--mute-2); padding: 3.5rem 0 2rem; border-top: 1px solid var(--line-dk); }
.site-foot a { color: rgba(241,244,240,.8); text-decoration: none; font-size: var(--step--1); }
.site-foot a:hover { color: var(--marigold); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2.5rem; }
@media (max-width: 780px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
.foot-grid h4 { color: var(--chalk); font-size: var(--step--1); margin-bottom: .8rem; font-family: var(--text); font-weight: 700; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.foot-brand svg, .foot-brand img { height: 30px; width: auto; margin-bottom: .9rem; }
.foot-brand p { font-size: var(--step--1); max-width: 30ch; }
.foot-base {
  display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; align-items: center;
  border-top: 1px solid var(--line-dk); margin-top: 2.8rem; padding-top: 1.4rem; font-size: .8125rem;
}
.foot-base p { margin: 0; }
.foot-base nav { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-left: auto; }

/* ---------- Utilities ---------------------------------------------------- */
.stack > * + * { margin-top: 1rem; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.center { text-align: center; }
.center p, .center h2 { margin-inline: auto; }
.figcap { font-size: .8125rem; color: var(--mute); margin-top: .6rem; }
.band-ink .figcap { color: var(--mute-2); }
.pill-row { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.pill { font-size: var(--step--1); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem; color: var(--mute); }
.band-ink .pill { border-color: var(--line-dk); color: var(--mute-2); }
