/* ============================================================
   Tangential — landing page
   Warm, editorial "paper" aesthetic that frames the dark app.
   CSP-safe: no inline styles, self-hosted system fonts only.
   ============================================================ */

:root {
  --paper:    #f4efe3;
  --paper-2:  #efe7d7;
  --paper-3:  #e9dfca;
  --ink:      #211d17;
  --ink-2:    #4c463b;
  --ink-3:    #7b7263;
  --line:     #dcd0ba;
  --line-2:   #cabfa6;
  --clay:     #bd5c37;
  --clay-2:   #a44c2b;
  --sage:     #4f6a58;
  --gold:     #b98a34;
  --night:    #0f131a;
  --night-2:  #161c26;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --maxw: 1140px;
  --radius: 14px;
  --shadow: 0 24px 60px -28px rgba(43, 30, 18, 0.55);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:   #15120d;
    --paper-2: #1d1913;
    --paper-3: #241f17;
    --ink:     #efe7d6;
    --ink-2:   #cabda4;
    --ink-3:   #948b78;
    --line:    #322b20;
    --line-2:  #443b2c;
    --clay:    #e08a5f;
    --clay-2:  #cd7649;
    --sage:    #93b39c;
    --gold:    #d3a54c;
    --shadow:  0 24px 60px -30px rgba(0, 0, 0, 0.8);
  }
}
:root[data-theme="dark"] {
  --paper: #15120d; --paper-2: #1d1913; --paper-3: #241f17;
  --ink: #efe7d6; --ink-2: #cabda4; --ink-3: #948b78;
  --line: #322b20; --line-2: #443b2c;
  --clay: #e08a5f; --clay-2: #cd7649; --sage: #93b39c; --gold: #d3a54c;
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.8);
}
:root[data-theme="light"] {
  --paper: #f4efe3; --paper-2: #efe7d7; --paper-3: #e9dfca;
  --ink: #211d17; --ink-2: #4c463b; --ink-3: #7b7263;
  --line: #dcd0ba; --line-2: #cabfa6;
  --clay: #bd5c37; --clay-2: #a44c2b; --sage: #4f6a58; --gold: #b98a34;
  --shadow: 0 24px 60px -28px rgba(43, 30, 18, 0.55);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(var(--line) 1px, transparent 1.4px);
  background-size: 26px 26px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--clay-2); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--clay); }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip:focus { left: 0; }

kbd {
  font-family: var(--mono); font-size: 0.82em;
  background: var(--paper-3); color: var(--ink-2);
  border: 1px solid var(--line-2); border-bottom-width: 2px;
  border-radius: 5px; padding: 1px 6px; white-space: nowrap;
}

/* ---------- shared typography ---------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--clay); margin: 0 0 14px;
}
.eyebrow.center { text-align: center; }

.section-title {
  font-family: var(--serif);
  font-weight: 600; font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 18px;
}
.section-title.center { text-align: center; }

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--ink-2);
  max-width: 62ch; margin: 0 auto;
}
.lede.center { text-align: center; }

/* ---------- header ---------- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 14px clamp(18px, 4vw, 48px);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { stroke: var(--clay); stroke-width: 2.4; fill: none; }
.brand-mark circle { fill: var(--paper); }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.01em; }

.site-nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 30px); }
.site-nav a { font-size: 0.95rem; color: var(--ink-2); text-decoration: none; }
.site-nav a:hover { color: var(--ink); }
.site-nav .nav-cta {
  color: var(--paper); background: var(--ink);
  padding: 8px 16px; border-radius: 999px; font-weight: 500;
}
.site-nav .nav-cta:hover { background: var(--clay-2); color: #fff; }
@media (max-width: 640px) {
  .site-nav a:not(.nav-cta) { display: none; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--sans); font-size: 1rem; font-weight: 500;
  padding: 13px 24px; border-radius: 999px; text-decoration: none;
  border: 1px solid transparent; transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--clay); color: #fff8f2;
  box-shadow: 0 12px 26px -12px color-mix(in srgb, var(--clay) 70%, transparent);
}
.btn-primary:hover { background: var(--clay-2); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink-3); color: var(--ink); }
.btn-lg { font-size: 1.08rem; padding: 16px 30px; }

/* ---------- layout helpers ---------- */

main { display: block; }
section { padding: clamp(64px, 9vw, 116px) clamp(18px, 4vw, 48px); }

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

.hero {
  display: grid; grid-template-columns: 1.02fr 1.15fr; gap: clamp(32px, 5vw, 72px);
  align-items: center; max-width: var(--maxw); margin: 0 auto;
  padding-top: clamp(48px, 7vw, 92px);
}
.hero-brand {
  display: inline-flex; align-items: center; gap: 12px;
  margin: 0 0 26px;
}
.hero-brand .brand-mark { stroke: var(--clay); stroke-width: 2.4; fill: none; }
.hero-brand .brand-mark circle { fill: var(--paper); }
.hero-brand span {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -0.01em;
  color: var(--ink);
}
@media (max-width: 900px) {
  .hero-brand { justify-content: center; }
}

.hero-title {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.5rem, 5.6vw, 4.3rem); line-height: 1.04; letter-spacing: -0.02em;
  margin: 0 0 22px;
}
.hero-title .mark {
  position: relative; color: var(--clay); white-space: nowrap;
}
.hero-title .mark::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: 0.02em; height: 0.42em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='18' viewBox='0 0 240 18'%3E%3Cpath d='M3 12 C 44 4 64 15 104 9 S 188 3 237 11' fill='none' stroke='%23bd5c37' stroke-width='4.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 100% 100%;
  z-index: -1; opacity: 0.85;
}
.hero-sub { font-size: clamp(1.08rem, 1.7vw, 1.28rem); color: var(--ink-2); max-width: 34ch; margin: 0 0 30px; }
.hero-sub strong { color: var(--ink); font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }
.cta-note { font-size: 0.9rem; color: var(--ink-3); margin: 0; }

/* framed screenshot "window" */
.frame {
  background: var(--night-2); border: 1px solid var(--line-2);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.frame-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px; background: var(--night);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.frame-bar span { width: 11px; height: 11px; border-radius: 50%; background: #3a4351; display: block; }
.frame-bar span:nth-child(1) { background: #b6603f; }
.frame-bar span:nth-child(2) { background: #b39338; }
.frame-bar span:nth-child(3) { background: #4c7357; }
.frame img { width: 100%; height: auto; }

.hero-shot { margin: 0; }
.hero-shot .frame { transform: rotate(0.6deg); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { max-width: none; margin-inline: auto; }
  .cta-row { justify-content: center; }
  .hero-shot .frame { transform: none; }
}

/* ---------- featured integration: BYOK / free start ---------- */

.byok { display: flex; justify-content: center; }
.byok-card {
  position: relative; overflow: hidden;
  max-width: 920px; width: 100%; text-align: center;
  padding: clamp(38px, 5vw, 64px) clamp(24px, 4vw, 60px);
  border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--clay) 40%, var(--line));
  background: radial-gradient(130% 150% at 50% -25%,
    color-mix(in srgb, var(--clay) 15%, var(--paper-2)), var(--paper-2) 62%);
  box-shadow: var(--shadow);
}
/* subtle dotted texture echoing the app canvas, fading downward */
.byok-card::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--clay) 22%, transparent) 1px, transparent 1.4px);
  background-size: 22px 22px; opacity: 0.4;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent 68%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent 68%);
}
.byok-card > * { position: relative; z-index: 1; }
.byok-badge {
  display: inline-block; font-family: var(--mono);
  font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--clay); background: color-mix(in srgb, var(--clay) 12%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--clay) 32%, transparent);
  border-radius: 999px; padding: 5px 14px; margin-bottom: 20px;
}
.byok-title {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.8rem, 3.8vw, 2.7rem); line-height: 1.12; letter-spacing: -0.01em;
  margin: 0 auto 16px; max-width: 20ch;
}
.byok-title .free-word { color: var(--clay); white-space: nowrap; }
.byok-text {
  max-width: 60ch; margin: 0 auto 30px; color: var(--ink-2);
  font-size: clamp(1rem, 1.4vw, 1.14rem);
}
.byok-text strong { color: var(--ink); font-weight: 600; }
.byok-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px; }

.provider-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.provider-pill {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 999px;
  padding: 11px 22px; font-family: var(--serif); font-size: 1.12rem; font-weight: 600; color: var(--ink);
}
.provider-pill.is-primary { border-color: var(--clay); background: color-mix(in srgb, var(--clay) 10%, var(--paper)); }
.provider-pill em {
  font-family: var(--mono); font-style: normal; font-weight: 500;
  font-size: 0.62rem; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--sage); background: color-mix(in srgb, var(--sage) 15%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--sage) 35%, transparent);
  border-radius: 999px; padding: 3px 9px;
}

/* ---------- the idea ---------- */

.idea { max-width: var(--maxw); margin: 0 auto; }
.idea .lede { margin-bottom: 46px; }

.contrast {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: clamp(16px, 3vw, 34px);
  align-items: stretch; max-width: 900px; margin: 0 auto;
}
.contrast-card {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px;
}
.contrast-card.is-after { border-color: var(--sage); background: color-mix(in srgb, var(--sage) 9%, var(--paper-2)); }
.contrast-card .tag {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3);
}
.contrast-card.is-after .tag { color: var(--sage); }
.contrast-card h3 { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; margin: 8px 0 14px; }
.contrast-card ul { margin: 0; padding: 0; list-style: none; }
.contrast-card li { position: relative; padding-left: 22px; margin-bottom: 10px; color: var(--ink-2); font-size: 0.98rem; }
.contrast-card li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em; width: 8px; height: 8px; border-radius: 50%;
  background: var(--line-2);
}
.contrast-card.is-after li::before { background: var(--sage); }
.contrast-arrow { align-self: center; font-size: 2rem; color: var(--clay); }
@media (max-width: 760px) {
  .contrast { grid-template-columns: 1fr; }
  .contrast-arrow { transform: rotate(90deg); justify-self: center; }
}

/* ---------- features ---------- */

.features { max-width: var(--maxw); margin: 0 auto; }
.features .section-title { margin-bottom: 52px; }
.feature-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.feature { background: var(--paper); padding: 30px 26px; }
.feature .glyph {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 11px; margin-bottom: 16px;
  background: color-mix(in srgb, var(--clay) 12%, var(--paper));
  color: var(--clay); font-size: 1.3rem; line-height: 1;
}
.feature h3 { font-family: var(--serif); font-size: 1.24rem; font-weight: 600; margin: 0 0 8px; }
.feature p { margin: 0; color: var(--ink-2); font-size: 0.96rem; line-height: 1.6; }
@media (max-width: 980px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---------- showcase ---------- */

.showcase { max-width: var(--maxw); margin: 0 auto; display: flex; flex-direction: column; gap: clamp(56px, 8vw, 104px); }
.show-row { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.show-row.reverse { grid-template-columns: 1fr 1.25fr; }
.show-row.reverse .show-shot { order: 2; }
.show-shot { margin: 0; }
.show-copy h3 { font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 600; line-height: 1.15; margin: 0 0 14px; }
.show-copy p { color: var(--ink-2); margin: 0; }
@media (max-width: 820px) {
  .show-row, .show-row.reverse { grid-template-columns: 1fr; }
  .show-row.reverse .show-shot { order: 0; }
}

/* ---------- how it works ---------- */

.how { max-width: var(--maxw); margin: 0 auto; }
.how .section-title { margin-bottom: 52px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%; margin-bottom: 18px;
  font-family: var(--serif); font-size: 1.3rem; font-weight: 600;
  color: var(--clay); background: var(--paper-2); border: 1.5px solid var(--clay);
}
.step h3 { font-family: var(--serif); font-size: 1.28rem; font-weight: 600; margin: 0 0 8px; }
.step p { margin: 0; color: var(--ink-2); font-size: 0.98rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 30px; } }

/* ---------- privacy band ---------- */

.privacy {
  background: var(--night);
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1.4px);
  background-size: 26px 26px;
  color: #e7ecf3;
}
.privacy-inner { max-width: 860px; margin: 0 auto; text-align: center; }
.privacy .eyebrow { color: var(--clay); }
.privacy .section-title { color: #f2f5fa; }
.privacy .lede { color: #b7c0cd; }
.privacy .lede strong { color: #fff; }
.privacy-points {
  list-style: none; margin: 40px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; text-align: left;
}
.privacy-points li {
  background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px; padding: 18px 20px;
}
.privacy-points strong { display: block; color: #fff; font-size: 1.02rem; margin-bottom: 4px; }
.privacy-points span { color: #97a2b1; font-size: 0.9rem; line-height: 1.5; }
@media (max-width: 720px) { .privacy-points { grid-template-columns: 1fr; } }

/* ---------- keyboard band ---------- */

.keys { max-width: var(--maxw); margin: 0 auto; text-align: center; }
.keys .section-title { margin-bottom: 36px; }
.key-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 780px; margin: 0 auto; }
.key-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px 8px 12px; font-size: 0.92rem; color: var(--ink-2);
}

/* ---------- final CTA ---------- */

.final-cta { text-align: center; max-width: 760px; margin: 0 auto; }
.final-cta h2 {
  font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 4.6vw, 3rem);
  line-height: 1.08; letter-spacing: -0.01em; margin: 0 0 14px;
}
.final-cta p { color: var(--ink-2); margin: 0 0 26px; }
.final-cta .btn { margin-bottom: 14px; }
.final-cta .cta-note { color: var(--ink-3); }

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 30px clamp(18px, 4vw, 48px); max-width: var(--maxw); margin: 0 auto;
}
.foot-brand-wrap { display: flex; flex-direction: column; gap: 4px; }
.foot-brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--serif); font-weight: 600; }
.foot-brand .brand-mark { stroke: var(--clay); stroke-width: 2.4; fill: none; }
.foot-brand .brand-mark circle { fill: var(--paper); }
.foot-byline { font-size: 0.8rem; color: var(--ink-3); }
.foot-byline a { color: var(--clay); text-decoration: none; }
.foot-byline a:hover { text-decoration: underline; }
.foot-note { color: var(--ink-3); font-size: 0.88rem; margin: 0; }
.foot-nav { display: flex; gap: 20px; }
.foot-nav a { color: var(--ink-2); text-decoration: none; font-size: 0.92rem; }
.foot-nav a:hover { color: var(--clay); }
