/* Songlog landing page — palette pulled from the cassette label. */

:root {
  --paper: #f3eddf;
  --paper-2: #ebe3d0;
  --card: #fbf8f1;
  --ink: #1d1a16;
  --ink-2: #4a443b;
  --muted: #7a7266;
  --line: rgba(29, 26, 22, 0.12);
  --orange: #c4552b;
  --orange-ink: #a8431d;
  --teal: #3f6466;
  --plum: #43345a;
  --navy: #2e3a66;
  --shadow: 0 1px 2px rgba(40, 30, 10, 0.06), 0 20px 50px -20px rgba(40, 30, 10, 0.35);

  /* the app itself is dark; these stay dark in both site themes */
  --app-bg: #0b0b0c;
  --app-surface: #1c1c1e;
  --app-text: #f2f2f2;
  --app-muted: #8e8e93;
  --app-chord: #3d8bff;
  --app-section: #f08a3c;

  --serif: "Crimson Pro", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --max: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151311;
    --paper-2: #1c1916;
    --card: #201d19;
    --ink: #f1ebde;
    --ink-2: #cfc7b8;
    --muted: #9a9183;
    --line: rgba(241, 235, 222, 0.12);
    --orange: #e0703f;
    --orange-ink: #f08550;
    --teal: #7fa9aa;
    --plum: #a493c4;
    --navy: #9aa8d8;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 24px 60px -20px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

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

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

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

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

a {
  color: inherit;
}

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

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

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

/* ---------- type ---------- */

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

h1 {
  font-size: clamp(48px, 8.4vw, 96px);
}

h2 {
  font-size: clamp(36px, 5.2vw, 60px);
}

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

em {
  font-style: italic;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: currentColor;
}

.lead {
  font-size: clamp(18px, 1.6vw, 20px);
  color: var(--ink-2);
  max-width: 34em;
}

.tag {
  font-family: var(--mono);
  color: var(--orange-ink);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-1px);
  background: var(--orange);
  color: #fff;
}
.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.btn-sm {
  padding: 9px 16px;
  font-size: 14px;
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav.scrolled {
  border-bottom-color: var(--line);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
}
.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--line);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
}
.nav-links a:not(.btn) {
  text-decoration: none;
  color: var(--ink-2);
}
.nav-links a:not(.btn):hover {
  color: var(--ink);
}

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

.hero {
  padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 120px);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero h1 {
  margin: 20px 0 24px;
}
.hero h1 em {
  color: var(--orange-ink);
}
.hero-cta {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}
.hero-meta {
  font-size: 14px;
  color: var(--muted);
}

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  padding-bottom: 40px;
}
.hero-art .phone {
  width: min(300px, 70vw);
  transform: rotate(2.5deg);
}
.hero-art .cassette {
  position: absolute;
  width: min(330px, 74vw);
  left: -8%;
  bottom: 0;
  transform: rotate(-9deg);
  filter: drop-shadow(0 18px 24px rgba(30, 20, 5, 0.35)) drop-shadow(0 2px 4px rgba(30, 20, 5, 0.25));
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.hero-art:hover .cassette {
  transform: rotate(-6deg) translateY(-6px);
}

/* ---------- device frames ---------- */

.phone {
  position: relative;
  border-radius: 46px;
  padding: 9px;
  background: #121212;
  box-shadow: inset 0 0 0 1.5px #3a3a3c, inset 0 0 0 4px #121212, var(--shadow);
}
.phone img {
  border-radius: 38px;
  width: 100%;
  aspect-ratio: 1284 / 2778;
  object-fit: cover;
  background: #000;
}

.tablet {
  border-radius: 34px;
  padding: 14px;
  background: #121212;
  box-shadow: inset 0 0 0 1.5px #3a3a3c, var(--shadow);
}
.tablet img {
  border-radius: 21px;
  width: 100%;
  aspect-ratio: 2732 / 2048;
  object-fit: cover;
  background: #000;
}

/* ---------- manifesto ---------- */

.manifesto {
  padding: clamp(56px, 8vw, 112px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.manifesto p {
  font-family: var(--serif);
  font-size: clamp(28px, 3.8vw, 46px);
  line-height: 1.18;
  max-width: 22em;
  letter-spacing: -0.005em;
}
.manifesto .muted {
  color: var(--muted);
}
.manifesto em {
  color: var(--orange-ink);
}
.stripes {
  display: grid;
  gap: 4px;
  width: 120px;
  margin-bottom: 32px;
}
.stripes span {
  height: 5px;
  border-radius: 2px;
}
.stripes span:nth-child(1) {
  background: var(--orange);
}
.stripes span:nth-child(2) {
  background: var(--teal);
}
.stripes span:nth-child(3) {
  background: var(--plum);
}

/* ---------- sections ---------- */

.section {
  padding: clamp(72px, 10vw, 140px) 0;
}
.section-head {
  max-width: 40em;
  margin-bottom: clamp(36px, 5vw, 64px);
}
.section-head h2 {
  margin: 18px 0 18px;
}

/* ---------- live editor demo ---------- */

.demo {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.demo-copy h2 {
  margin: 18px 0 20px;
}
.demo-copy .lead + .lead {
  margin-top: 14px;
}

.editor {
  background: var(--app-bg);
  color: var(--app-text);
  border-radius: 22px;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
  min-width: 0;
}
.editor-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 0;
}
.dots {
  display: flex;
  gap: 7px;
}
.dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #3a3a3c;
}
.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: var(--app-surface);
  font-size: 13px;
}
.seg button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--app-muted);
  font: inherit;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
}
.seg button[aria-selected="true"] {
  background: #3a3a3c;
  color: var(--app-text);
}
.editor-body {
  padding: 18px 22px 8px;
}
.editor-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 22px;
  margin: 0 0 14px;
}
.sheet {
  font-family: var(--mono);
  font-size: clamp(11.5px, 1.25vw, 14px);
  line-height: 1.55;
  margin: 0;
  white-space: pre;
  overflow-x: auto;
  min-height: 29.5em; /* 19 editor lines, so switching views doesn't jump */
  scrollbar-width: none;
}
.sheet::-webkit-scrollbar {
  display: none;
}
.sheet .c {
  color: var(--app-chord);
  border-radius: 4px;
  transition: background 0.15s ease;
  cursor: default;
}
.sheet .c:hover {
  background: rgba(61, 139, 255, 0.22);
}
.sheet .s {
  color: var(--app-section);
}
.sheet .d {
  color: var(--app-muted);
}
.sheet .caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-left: 1px;
  vertical-align: -0.2em;
  background: var(--app-chord);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

.transport {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 4px 12px;
  padding: 14px 22px 18px;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #121214;
  font-size: 13px;
}
.transport .wave {
  width: 20px;
  height: 20px;
  color: var(--app-text);
}
.transport b {
  font-weight: 600;
  display: block;
}
.transport small {
  color: var(--app-muted);
  font-size: 11px;
}
.transport .time {
  color: var(--app-muted);
  font-variant-numeric: tabular-nums;
}
.transport .controls {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}
.rec {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ff3b30;
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.25);
  flex: none;
}
.play {
  width: 0;
  height: 0;
  border-left: 13px solid var(--app-text);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  flex: none;
}
.track {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #3a3a3c;
  position: relative;
  overflow: hidden;
}
.track::after {
  content: "";
  position: absolute;
  inset: 0 64% 0 0;
  background: var(--app-text);
  border-radius: 2px;
}
.editor-note {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
}

/* ---------- feature rows ---------- */

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  padding: clamp(40px, 6vw, 80px) 0;
}
.feature + .feature {
  border-top: 1px solid var(--line);
}
.feature.flip .feature-copy {
  order: 2;
}
.feature-copy h2 {
  margin: 18px 0 20px;
}
.feature-copy ul {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  display: grid;
  gap: 12px;
}
.feature-copy li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-2);
}
.feature-copy li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 12px;
  height: 2px;
  background: var(--orange);
}
.phones {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(14px, 2.4vw, 28px);
}
.phones .phone {
  width: min(250px, 44vw);
}
.phones .phone:nth-child(2) {
  margin-top: 56px;
}

/* ---------- iPad ---------- */

.ipad {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.ipad .section-head {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.ipad .tablet {
  max-width: 960px;
  margin: 0 auto;
}

/* ---------- details grid ---------- */

.details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.detail {
  background: var(--card);
  padding: 28px 26px 30px;
}
.detail svg {
  width: 26px;
  height: 26px;
  color: var(--orange);
  margin-bottom: 16px;
}
.detail h3 {
  font-size: 22px;
  margin-bottom: 8px;
}
.detail p {
  color: var(--ink-2);
  font-size: 15.5px;
}

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

.privacy-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.privacy-block h2 {
  margin: 18px 0 20px;
}
.promises {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.promise {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.promise b {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--orange-ink);
  padding-top: 3px;
}
.promise p {
  color: var(--ink-2);
}
.text-link {
  display: inline-block;
  margin-top: 24px;
  font-weight: 600;
  text-decoration-color: var(--orange);
  text-underline-offset: 4px;
}

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

.final {
  text-align: center;
  padding: clamp(80px, 11vw, 160px) 0;
  border-top: 1px solid var(--line);
}
.final img {
  width: min(420px, 80vw);
  margin: 0 auto 48px;
  transform: rotate(-3deg);
  filter: drop-shadow(0 22px 30px rgba(30, 20, 5, 0.35)) drop-shadow(0 2px 4px rgba(30, 20, 5, 0.25));
}
.final h2 {
  font-size: clamp(42px, 6.4vw, 76px);
  margin-bottom: 20px;
}
.final .lead {
  margin: 0 auto 36px;
}

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

.footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 56px;
  font-size: 14.5px;
  color: var(--muted);
}
.footer .wrap {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
}
.footer .brand {
  color: var(--ink);
  margin-bottom: 12px;
}
.footer h4 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.footer a {
  color: var(--ink-2);
  text-underline-offset: 3px;
}
.footer a:hover {
  color: var(--orange-ink);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 16px;
}

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.no-js .reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .sheet .caret {
    animation: none;
  }
  .hero-art .cassette,
  .btn {
    transition: none;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero .wrap,
  .demo,
  .feature,
  .privacy-block {
    grid-template-columns: 1fr;
  }
  .feature.flip .feature-copy {
    order: 0;
  }
  .hero-art {
    margin-top: 12px;
  }
  .hero-art .cassette {
    left: 0;
  }
  .details {
    grid-template-columns: 1fr 1fr;
  }
  .nav-links .hide-sm {
    display: none;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }
  .details {
    grid-template-columns: 1fr;
  }
  .promise {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .footer .wrap {
    grid-template-columns: 1fr;
  }
  .phones .phone:nth-child(2) {
    margin-top: 36px;
  }
  .editor-body {
    padding: 16px 16px 6px;
  }
  .transport {
    padding: 12px 16px 16px;
  }
  .nav-links {
    gap: 16px;
  }
}

/* ---------- privacy / prose pages ---------- */

.prose {
  max-width: 760px;
  padding-top: clamp(40px, 6vw, 80px);
  padding-bottom: clamp(56px, 8vw, 112px);
}
.prose article {
  scroll-margin-top: 88px;
}
.prose h1 {
  font-size: clamp(44px, 6vw, 64px);
  margin-bottom: 18px;
}
.prose h2 {
  font-size: clamp(26px, 3vw, 32px);
  margin: 44px 0 12px;
}
.prose p,
.prose li {
  color: var(--ink-2);
}
.prose p + p,
.prose p + ul,
.prose ul + p {
  margin-top: 14px;
}
.prose ul {
  padding-left: 1.2em;
  margin: 12px 0 0;
  display: grid;
  gap: 10px;
}
.prose li::marker {
  color: var(--orange);
}
.prose strong {
  color: var(--ink);
}
.prose a {
  text-decoration-color: var(--orange);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 72px 0 56px;
}
.prose [lang="ko"] {
  word-break: keep-all;
}
.prose [lang="ko"] h1,
.prose [lang="ko"] h2 {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.prose [lang="ko"] h1 {
  font-size: clamp(36px, 5vw, 48px);
}
.prose [lang="ko"] h2 {
  font-size: clamp(21px, 2.4vw, 24px);
}
