/* Inkidian — site styles. No external fonts, no trackers. */

:root {
  --ground: #161717;
  --raised: #1F1F22;
  --line: #2E2D33;
  --text: #ECE9F4;
  --muted: #A6A2B3;
  --violet: #B79CFA;
  --violet-deep: #5B3BC4;
  --paper: #F7F6FB;

  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", sans-serif;

  --measure: 64ch;
  --gutter: clamp(16px, 5vw, 48px);

  color-scheme: dark;
}

* { box-sizing: border-box; }

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

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

[id] { scroll-margin-top: 24px; }

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 10;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--violet);
  color: #1A1033;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 16px; color: #1A1033; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--violet); text-underline-offset: 0.18em; }
a:hover { color: #D3C2FF; }

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

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); }
.brand img { width: 36px; height: 36px; border-radius: 9px; }

.site-nav { display: flex; gap: 20px; font-size: 0.9375rem; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 10px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

/* Type */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

p, dd, li { text-wrap: pretty; }

h1 { font-size: clamp(2.5rem, 5.4vw, 3.875rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.3125rem; line-height: 1.3; }

p { margin: 0; }

.lede {
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  color: var(--muted);
  max-width: 34em;
}

/* Buttons */

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font: 600 1rem/1 var(--sans);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.button-primary { background: var(--violet); color: #1A1033; }
.button-primary:hover { background: #CBB6FF; color: #1A1033; }

.button-quiet { border-color: var(--line); color: var(--text); background: transparent; }
.button-quiet:hover { border-color: var(--muted); color: var(--text); }

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  padding-top: clamp(24px, 6vw, 72px);
  padding-bottom: clamp(56px, 9vw, 120px);
}

.hero-copy { display: flex; flex-direction: column; gap: 24px; }
.hero-copy .actions { margin-top: 8px; }

.beta-note { font-size: 0.9375rem; color: var(--muted); }

.sheet {
  margin: 0;
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 30px 80px -30px rgba(91, 59, 196, 0.55);
  transform: rotate(-1.5deg);
}
.sheet svg { width: 100%; height: auto; }

/* Ink animation: one orchestrated moment on load */

.ink {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: write 0.9s cubic-bezier(.55,.1,.35,1) forwards;
}
.ink-pen { stroke: var(--violet-deep); stroke-width: 3.2; }
.ink-hl { stroke: var(--violet); stroke-width: 16; opacity: 0.55; mix-blend-mode: multiply; }
.d1 { animation-delay: 0.5s; }
.d2 { animation-delay: 1.3s; }
.d3 { animation-delay: 2.1s; animation-duration: 0.6s; }
.d4 { animation-delay: 2.6s; }
.d5 { animation-delay: 3.3s; animation-duration: 0.5s; }

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

@media (prefers-reduced-motion: reduce) {
  .ink { animation: none; stroke-dashoffset: 0; }
}

/* Sections */

.section {
  padding-top: clamp(56px, 8vw, 104px);
  padding-bottom: clamp(56px, 8vw, 104px);
  border-top: 1px solid var(--line);
}

/* Screenshots */

.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.shots figure { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.shots img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); }
.shots figcaption { color: var(--muted); font-size: 0.9375rem; }

.section-head { max-width: var(--measure); display: flex; flex-direction: column; gap: 14px; }
.section-head p { color: var(--muted); }

.points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  margin: 48px 0 0;
}
.points div { display: flex; flex-direction: column; gap: 10px; }
.points dt { font-family: var(--serif); font-size: 1.3125rem; font-weight: 600; line-height: 1.3; }
.points dd { margin: 0; color: var(--muted); }

.points a { white-space: nowrap; }

/* How it works: the file flow. Solid arrows = files, dashed loop = switching apps. */

.flow {
  --link: 172px;
  margin: 56px 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--link) minmax(0, 1fr) var(--link) minmax(0, 1fr);
  align-items: stretch;
}

.flow-node {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.flow-node h3 { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; }
.flow-node h3 img { width: 28px; height: 28px; border-radius: 7px; }
.flow-where { color: var(--violet); font-size: 0.9375rem; }
.flow-what { color: var(--muted); margin-top: 10px; }

.flow-vault { background: var(--paper); border-color: var(--paper); color: #1D1A26; }
.flow-vault .flow-where { color: var(--violet-deep); }

.flow-files {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9375rem;
  color: #4A4558;
}
.flow-files li { display: flex; align-items: center; gap: 10px; }
.flow-files li::before {
  content: "";
  flex: none;
  width: 11px;
  height: 14px;
  border: 1.5px solid #8C84A8;
  border-radius: 2px;
}

.flow-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 14px;
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--muted);
}
.flow-link .arrow { position: relative; display: block; width: 100%; height: 1.5px; background: var(--violet); }
.flow-link .arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid var(--violet);
}

.flow-return {
  grid-column: 1 / -1;
  position: relative;
  height: 56px;
  margin: 0 calc((100% - 2 * var(--link)) / 6);
  border: 1.5px dashed rgba(183, 156, 250, 0.6);
  border-top: none;
  border-radius: 0 0 28px 28px;
}
.flow-return::before {
  content: "";
  position: absolute;
  left: -6.75px;
  top: -1px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 9px solid var(--violet);
}
.flow-return span {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 50%);
  padding: 0 14px;
  background: var(--ground);
  color: var(--muted);
  font-size: 0.9375rem;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.loop-icon { display: none; width: 18px; height: 18px; color: var(--violet); flex: none; }

.flow figcaption {
  grid-column: 1 / -1;
  margin-top: 56px;
  max-width: 40em;
  font-family: var(--serif);
  font-size: clamp(1.1875rem, 1.8vw, 1.375rem);
  line-height: 1.45;
  color: var(--text);
  text-wrap: balance;
}

.price { max-width: var(--measure); display: flex; flex-direction: column; gap: 14px; }
.price p { color: var(--muted); }

/* FAQ */

.faq { margin-top: 40px; max-width: 72ch; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 36px 20px 0;
  position: relative;
  font-family: var(--serif);
  font-size: 1.1875rem;
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--muted);
}
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 22px; color: var(--muted); display: flex; flex-direction: column; gap: 12px; }

/* Signup */

.signup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: end; }
.signup-form { display: flex; flex-direction: column; gap: 10px; }
.signup-form label { font-size: 0.9375rem; color: var(--muted); }
.signup-row { display: flex; flex-wrap: wrap; gap: 10px; }
.signup-row input {
  flex: 1 1 220px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--text);
  font: 1rem var(--sans);
}
.signup-row input::placeholder { color: #8B8798; }
.signup-row input:focus-visible { border-color: var(--violet); outline-offset: 2px; }
.signup-small { font-size: 0.875rem; color: var(--muted); }
.signup-status { font-weight: 600; }
.signup-form [hidden] { display: none; }

/* Footer */

.site-footer { border-top: 1px solid var(--line); }
.footer-inner {
  padding-top: 40px;
  padding-bottom: 56px;
  font-size: 0.875rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.disclaimer { max-width: 80ch; }

/* Text pages (privacy, support) */

.doc { max-width: 68ch; padding-top: clamp(24px, 5vw, 56px); padding-bottom: clamp(56px, 8vw, 96px); }
.doc h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); margin-bottom: 12px; }
.doc .updated { color: var(--muted); font-size: 0.9375rem; margin-bottom: 40px; }
.doc .summary {
  font-family: var(--serif);
  font-size: 1.3125rem;
  line-height: 1.5;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}
.doc h2 { font-size: 1.5rem; margin: 44px 0 12px; }
.doc p, .doc ul { color: #D4D0DE; margin: 0 0 14px; }
.doc ul { padding-left: 1.25em; }
.doc li { margin-bottom: 6px; }

/* Responsive */

@media (max-width: 1000px) {
  .flow { --link: 110px; }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .sheet { transform: none; max-width: 560px; }
  .points { grid-template-columns: minmax(0, 1fr); }
  .signup { grid-template-columns: minmax(0, 1fr); }
  .shots { grid-template-columns: minmax(0, 1fr); }

  .flow { grid-template-columns: minmax(0, 1fr); margin-top: 40px; }
  .flow-link { flex-direction: row; justify-content: flex-start; gap: 16px; padding: 10px 0 10px 28px; text-align: left; }
  .flow-link .arrow { order: -1; width: 1.5px; height: 40px; flex: none; }
  .flow-link .arrow::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: -1px;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 9px solid var(--violet);
    border-bottom: 0;
  }
  .flow-return { height: auto; margin: 20px 0 0; border: 0; border-radius: 0; }
  .flow-return::before { display: none; }
  .flow-return span { position: static; transform: none; padding: 0; white-space: normal; background: none; align-items: flex-start; }
  .loop-icon { display: block; margin-top: 3px; }
  .flow figcaption { margin-top: 32px; }
}

@media (max-width: 420px) {
  .site-nav { gap: 14px; }
  .button { width: 100%; }
}
