/* link-insights.com – design tokens, fonts, base. Details: DESIGN.md */

/* ---------- Fonts (self-hosted, variable) ---------- */
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-serif-4-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-serif-4-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-serif-4-latin-ext-wght-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/instrument-sans-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Metric-adjusted fallbacks: swapping in the web font causes no layout shift. */
@font-face {
  font-family: "Source Serif 4 Fallback";
  src: local("Georgia");
  size-adjust: 108.5%;
  ascent-override: 95.5%;
  descent-override: 30.9%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Instrument Sans Fallback";
  src: local("Arial");
  size-adjust: 102.1%;
  ascent-override: 95%;
  descent-override: 24.5%;
  line-gap-override: 0%;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #fbf8f2;
  --stage: #efe4d4;
  --sand: #e3d6c3;
  --line: #e7decf;
  --ink: #231d18;
  --ink-2: #4a4038;
  --muted: #6e6258;
  --accent: #b4532a;
  --accent-deep: #8e3f1e;
  --accent-tint: #f3e3d3;
  --accent-ink: #9c4522;
  --risk: #c23a22;
  --flag-ring: rgba(0, 0, 0, 0.08);

  --serif: "Source Serif 4", "Source Serif 4 Fallback", Georgia, serif;
  --sans: "Instrument Sans", "Instrument Sans Fallback", system-ui, sans-serif;

  --gutter: 56px;
  --radius-stage: 28px;
  --header-h: 76px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1c1916;
    --stage: #24201c;
    --sand: #33291c;
    --line: #3a322a;
    --ink: #f3ece2;
    --ink-2: #d6cbbe;
    --muted: #a3968a;
    --accent: #e3a93f;
    --accent-deep: #f0bd5e;
    --accent-tint: #33291c;
    --accent-ink: #e8b04a;
    --flag-ring: rgba(255, 255, 255, 0.16);
  }
}

@media (max-width: 600px) {
  :root {
    --gutter: 20px;
    --header-h: 64px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
}

h1 {
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.022em;
}

h1 em {
  color: var(--accent);
  font-style: italic;
}

h2 {
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.018em;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 3px;
}

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

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

.skip-link:focus {
  top: 12px;
  color: var(--paper);
}

.wrap {
  padding-inline: var(--gutter);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: calc(1440px + 2 * var(--gutter));
  margin-inline: auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.btn-ink {
  background: var(--ink);
  color: var(--paper);
}

.btn-ink:hover {
  background: var(--accent-deep);
  color: var(--paper);
}

.btn-sm {
  padding: 10px 18px;
  font-size: 14px;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.logo-mark {
  flex: none;
  border-radius: 6px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

/* ---------- Language switcher ---------- */
.flag {
  position: relative;
  display: inline-block;
  flex: none;
  width: 20px;
  height: 15px;
  border-radius: 2px;
  overflow: hidden;
}

.flag img {
  display: block;
  width: 100%;
  height: 100%;
}

.flag::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px var(--flag-ring);
}

.lang {
  position: relative;
}

.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.lang-trigger::-webkit-details-marker {
  display: none;
}

.lang-trigger:hover,
.lang[open] .lang-trigger {
  background: var(--sand);
}

.chevron {
  transition: transform 0.2s;
}

.lang[open] .chevron {
  transform: rotate(180deg);
}

.lang-list {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  z-index: 50;
  min-width: 210px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 40px -16px rgba(60, 35, 20, 0.35);
}

.lang-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 15px;
  text-decoration: none;
}

.lang-list a:hover {
  background: var(--stage);
  color: var(--ink);
}

.lang-list a[aria-current] {
  font-weight: 600;
}

.lang-name {
  flex: 1;
}

.check {
  color: var(--accent);
}

/* Language hint on "/" */
.lang-hint {
  background: var(--accent-tint);
  color: var(--accent-ink);
  font-size: 15px;
}

.lang-hint .wrap {
  position: relative;
  padding-block: 10px;
}

.lang-hint a {
  color: inherit;
  font-weight: 600;
}

.lang-hint-close {
  position: absolute;
  inset-inline-end: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Home ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px 56px;
  padding-top: 48px;
}

.hero h1 {
  max-width: 17ch;
}

.lead {
  max-width: 52ch;
  margin-top: 24px;
  font-size: 19px;
  line-height: 1.5;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.note {
  color: var(--muted);
  font-size: 15px;
}

.stage-wrap {
  margin-top: 40px;
}

/* ---------- Sections ---------- */
.section {
  padding-block: 72px 0;
}

.section-head {
  max-width: 62ch;
  margin-bottom: 32px;
}

.section-head .lead,
.suggest .lead,
.newsletter .lead {
  margin-top: 16px;
}

.text-link {
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  color: var(--accent-deep);
  text-decoration: underline;
}

.situations {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.situation {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.situation h3 {
  font-size: 26px;
  line-height: 1.15;
}

.situation p {
  flex: 1;
  font-size: 16px;
}

.qgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.qcard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 24px;
  border-radius: 20px;
  background: var(--stage);
  color: var(--ink-2);
  text-decoration: none;
  transition: background 0.2s;
}

.qcard:hover {
  background: var(--accent-tint);
  color: var(--ink-2);
}

.qname {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.2;
}

.qdesc {
  display: -webkit-box;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.45;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.plan {
  padding: 36px;
  border-radius: var(--radius-stage);
}

.plan h3 {
  margin-bottom: 20px;
  font-size: 30px;
}

.plan ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan li {
  position: relative;
  padding-inline-start: 22px;
  font-size: 17px;
}

.plan li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.plan-free {
  background: var(--stage);
}

.plan-full {
  background: var(--ink);
  color: var(--paper);
}

.plan-full h3 {
  color: var(--paper);
}

.plans-note {
  margin-top: 16px;
}

.founder blockquote {
  max-width: 44ch;
  margin: 24px 0 0;
}

.founder blockquote p {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.45;
}

.founder footer {
  margin-top: 20px;
  color: var(--muted);
  font-size: 15px;
}

.founder-label {
  color: var(--accent-ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.suggest-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: start;
}

.form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.field {
  display: grid;
  gap: 6px;
}

.field > span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.field small,
.form-privacy,
.form-promise {
  color: var(--muted);
  font-size: 13px;
}

.form input[type="text"],
.form input[type="url"],
.form input[type="email"],
.form textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.form textarea {
  resize: vertical;
}

.form input:focus-visible,
.form textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}

.check input:disabled + span {
  color: var(--muted);
}

.form .btn {
  justify-self: start;
  border: 0;
  cursor: pointer;
}

.form .btn[disabled] {
  opacity: 0.6;
  cursor: default;
}

.form-status {
  min-height: 1.4em;
  color: var(--ink);
  font-weight: 600;
}

.form-status[data-state="error"] {
  color: var(--risk);
}

.hp {
  position: absolute;
  inset-inline-start: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.roadmap {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.roadmap h3 {
  font-size: 28px;
}

.roadmap ul {
  display: grid;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.roadmap li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.status {
  flex: none;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent-ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.newsletter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 48px;
  border-radius: var(--radius-stage);
  background: var(--accent-tint);
}

.newsletter .form {
  margin-top: 0;
}

.inline-form {
  display: flex;
  gap: 10px;
}

.inline-form input {
  flex: 1;
  min-width: 0;
}

.faq h2 {
  margin-bottom: 24px;
}

.faq-list {
  border-bottom: 1px solid var(--line);
}

.faq details {
  border-top: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--accent);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  max-width: 70ch;
  padding-bottom: 22px;
}

/* ---------- Inner pages ---------- */
.page-head {
  padding-top: 48px;
}

.page-head h1 {
  max-width: 20ch;
  font-size: clamp(38px, 5vw, 64px);
}

.page-head .lead {
  max-width: 62ch;
}

.page-head.narrow h1 {
  max-width: 24ch;
}

.crumbs {
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 14px;
}

.crumbs a {
  color: inherit;
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.head-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 28px;
}

.app-name {
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
}

.example h2,
.section > h2 {
  margin-bottom: 24px;
  font-size: clamp(28px, 3.4vw, 40px);
}

.example-card {
  display: grid;
  gap: 18px;
  max-width: 720px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--stage);
}

.example-for {
  color: var(--muted);
  font-size: 15px;
}

.example-for span {
  color: var(--ink);
  font-weight: 600;
}

.example-result {
  padding: 20px;
  border-radius: 16px;
  background: var(--paper);
}

.example-pill {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
}

.example-result ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.5;
}

.example-result li::before {
  content: "– ";
}

.three-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.three-steps .num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-weight: 600;
}

.three-steps h3 {
  margin-bottom: 6px;
  font-family: var(--sans);
  font-size: 19px;
  font-weight: 600;
}

.cta-panel {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 56px 24px;
  border-radius: var(--radius-stage);
  background: var(--stage);
  text-align: center;
}

.cta-panel h2 {
  margin: 0;
}

.legal {
  padding-block: 48px 0;
}

.prose {
  max-width: 70ch;
}

.prose h1 {
  margin-bottom: 24px;
  font-size: clamp(38px, 5vw, 56px);
}

.prose h2 {
  margin-block: 36px 10px;
  font-size: 28px;
}

.prose p {
  margin-bottom: 14px;
}

.notice {
  max-width: 70ch;
  margin-bottom: 24px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--accent-tint);
  color: var(--accent-ink);
  font-size: 15px;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.support-grid h2 {
  margin-bottom: 10px;
  font-size: 28px;
}

.lang-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

/* ---------- Footer ---------- */
.site-footer {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1fr;
  gap: 32px 48px;
  margin-top: 96px;
  padding-block: 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer-col h2 {
  margin-bottom: 12px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-col ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col a {
  color: var(--ink-2);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--accent-deep);
  text-decoration: underline;
}

.footer-legal {
  grid-column: 1 / -1;
  max-width: 80ch;
}

.nav-link {
  padding: 8px 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .situations {
    grid-template-columns: repeat(2, 1fr);
  }

  .qgrid {
    grid-template-columns: repeat(2, 1fr);
  }

  .suggest-grid,
  .newsletter {
    grid-template-columns: 1fr;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .plans,
  .three-steps,
  .support-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hero {
    padding-top: 24px;
  }

  .lead {
    font-size: 17px;
  }

  .section {
    padding-top: 56px;
  }

  .situations,
  .qgrid,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .newsletter,
  .plan {
    padding: 28px 20px;
  }

  .inline-form {
    flex-direction: column;
  }

  .nav-link {
    display: none;
  }

  .btn-sm {
    padding: 9px 14px;
  }
}
