/* Einband — einband.app
   Colors and type follow the iOS app (AppStyle.swift, Assets.xcassets/Colors). */

@font-face { font-family: "ABC Normal"; src: url("fonts/ABCNormal-Book.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "ABC Normal"; src: url("fonts/ABCNormal-Regular.woff2") format("woff2"); font-weight: 450; font-display: swap; }
@font-face { font-family: "ABC Normal"; src: url("fonts/ABCNormal-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "ABC Normal"; src: url("fonts/ABCNormal-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "ABC Normal"; src: url("fonts/ABCNormal-Super.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  /* App: BackgroundColor, ForegroundColor, AccentColor (light) */
  --paper: #F2EFE7;
  --ink: #0F0F0F;
  --cloth: #80A3BF;
  --cloth-ink: #2F4E66;        /* readable blue for text on paper */
  --card: #FAF7F0;             /* Discover cards */
  --muted: #6F6B63;
  --line: rgb(15 15 15 / 0.10);
  --shadow: 0 1px 2px rgb(40 30 10 / 0.06), 0 12px 32px rgb(40 30 10 / 0.08);
  --bezel: #1B1A18;
  --button: #22211F;            /* "Notiz erstellen" */
  --button-ink: #F2EFE7;
  --focus: #2F4E66;

  --radius-l: 32px;
  --radius-m: 22px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1160px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* App: BackgroundColor, ForegroundColor, AccentColor (dark) */
    --paper: #121211;
    --ink: #F2EFE7;
    --cloth-ink: #BFD1DF;
    --card: #1D1C1A;
    --muted: #A8A399;
    --line: rgb(242 239 231 / 0.12);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 32px rgb(0 0 0 / 0.35);
    --bezel: #000;
    --button: #F2EFE7;
    --button-ink: #121211;
    --focus: #BFD1DF;
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "ABC Normal", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01" 0;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10;
  background: var(--button); color: var(--button-ink); padding: 10px 16px; border-radius: 999px; text-decoration: none;
}
.skip:focus { top: 12px; }

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

/* Header */
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.wordmark { font-weight: 500; font-size: 26px; letter-spacing: -0.02em; text-decoration: none; }
.site-nav { display: flex; gap: 28px; font-size: 16px; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover { color: var(--ink); }
@media (max-width: 640px) { .site-nav { display: none; } }

/* Store badge (placeholder until the App Store link exists) */
.store {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  background: var(--button); color: var(--button-ink);
  font-weight: 700; font-size: 18px; text-decoration: none; white-space: nowrap;
}

/* Hero: a clothbound book cover */
.hero { padding-top: 8px; }
.cover {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: 18px var(--radius-l) var(--radius-l) 18px;
  background: var(--cloth) url("img/cloth.jpg") center / cover;
  color: #0F0F0F;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: end; gap: 24px;
  padding: clamp(40px, 6vw, 80px) clamp(28px, 6vw, 88px) 0 clamp(44px, 7vw, 104px);
  min-height: min(720px, 86vh);
}
/* Spine and hinge groove on the left edge */
.cover::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: clamp(18px, 2.4vw, 30px); z-index: -1;
  background: linear-gradient(90deg, rgb(0 0 0 / 0.20), rgb(0 0 0 / 0.06) 55%, rgb(255 255 255 / 0.10) 70%, rgb(0 0 0 / 0.10) 100%);
}
/* Veil: keeps the weave visible but quiet enough for running text */
.cover::after {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(120% 90% at 30% 20%, rgb(255 255 255 / 0.10), transparent 60%),
    rgb(128 163 191 / 0.58);
}
.cover-copy { align-self: center; padding-bottom: clamp(40px, 6vw, 80px); max-width: 560px; }
.eyebrow { font-weight: 500; font-size: 16px; letter-spacing: 0.01em; margin: 0 0 18px; }
.hero h1 {
  font-weight: 900; font-size: clamp(44px, 7vw, 88px); line-height: 0.98; letter-spacing: -0.035em;
  margin: 0 0 24px; text-wrap: balance;
}
.lede { font-weight: 500; font-size: clamp(18px, 1.8vw, 21px); line-height: 1.45; margin: 0 0 32px; max-width: 30em; }
.cover .store { background: #0F0F0F; color: #F2EFE7; }
.cover .note { margin: 14px 0 0; font-size: 15px; opacity: 0.72; }
.cover-device { justify-self: center; width: min(360px, 100%); margin-bottom: -2px; transform: translateY(12%); }

@media (max-width: 860px) {
  /* Portrait texture at its native scale, so the weave keeps its fineness on tall phones */
  .cover, .back-cover { background-image: url("img/cloth-portrait.jpg"); background-size: 820px auto; background-position: center top; }
  .cover { grid-template-columns: 1fr; min-height: 0; padding-right: 28px; }
  .cover-copy { padding-bottom: 8px; }
  .cover-device { width: min(300px, 82%); transform: translateY(18%); margin-top: 8px; }
}

/* Device frame around real app screenshots */
.device {
  position: relative; border-radius: 54px; padding: 10px; background: var(--bezel);
  box-shadow: 0 30px 60px rgb(20 30 40 / 0.28), 0 2px 0 rgb(255 255 255 / 0.06) inset;
}
.device img { border-radius: 44px; width: 100%; aspect-ratio: 1206 / 2622; object-fit: cover; background: #F2EFE7; }
.device.cropped { overflow: hidden; }
.device.cropped img { aspect-ratio: auto; }

/* Sections */
main section { padding: clamp(72px, 10vw, 136px) 0 0; }
.hero + section { padding-top: clamp(112px, 14vw, 180px); }
.section-head { max-width: 680px; margin-bottom: clamp(36px, 5vw, 56px); }
.kicker { color: var(--cloth-ink); font-weight: 500; font-size: 16px; margin: 0 0 12px; }
h2 { font-weight: 500; font-size: clamp(34px, 4.6vw, 54px); line-height: 1.04; letter-spacing: -0.028em; margin: 0 0 18px; text-wrap: balance; }
h3 { font-weight: 500; font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 8px; }
.section-head p, .split-copy > p { color: var(--muted); font-size: 19px; margin: 0; max-width: 34em; }

/* Three ways in */
.ways { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: clamp(32px, 6vw, 88px); align-items: center; }
.ways ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: way; }
.ways li {
  counter-increment: way; background: var(--card); border-radius: var(--radius-m); padding: 26px 28px 26px 84px; position: relative;
  box-shadow: var(--shadow);
}
.ways li::before {
  content: counter(way); position: absolute; left: 28px; top: 24px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 16px; background: var(--cloth); color: #0F0F0F;
}
.ways li p { margin: 0; color: var(--muted); }
@media (max-width: 860px) {
  .ways { grid-template-columns: 1fr; }
  .ways .device { width: min(320px, 86%); justify-self: center; }
}

/* Split feature rows */
.split { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: clamp(32px, 7vw, 112px); align-items: center; }
.split.reverse { grid-template-columns: minmax(0, 1fr) minmax(0, 360px); }
.split.reverse .device { order: 2; }
.split-copy ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.split-copy li { padding-left: 30px; position: relative; }
.split-copy li::before {
  content: ""; position: absolute; left: 2px; top: 0.42em; width: 12px; height: 12px; border-radius: 3px 3px 3px 1px;
  background: var(--cloth); box-shadow: inset 2px 0 0 rgb(0 0 0 / 0.18);
}
.split-copy li strong { font-weight: 500; }
.split-copy li span { display: block; color: var(--muted); }
@media (max-width: 860px) {
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split .device, .split.reverse .device { order: 2; width: min(320px, 86%); justify-self: center; }
}

/* Small feature grid */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile { background: var(--card); border-radius: var(--radius-m); padding: 28px; box-shadow: var(--shadow); }
.tile p { margin: 0; color: var(--muted); }
.tile .glyph { width: 44px; height: 44px; margin-bottom: 18px; color: var(--ink); }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

/* Privacy */
.privacy { border-top: 1px solid var(--line); padding-top: clamp(48px, 7vw, 80px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); }
.privacy dl { margin: 0; display: grid; gap: 22px; }
.privacy dt { font-weight: 500; font-size: 19px; }
.privacy dd { margin: 4px 0 0; color: var(--muted); }
@media (max-width: 860px) { .privacy { grid-template-columns: 1fr; } }

/* Closing back cover */
.back-cover {
  margin-top: clamp(72px, 10vw, 136px);
  border-radius: var(--radius-l) 18px 18px var(--radius-l);
  background: var(--cloth) url("img/cloth.jpg") center / cover;
  color: #0F0F0F; text-align: center;
  padding: clamp(56px, 8vw, 104px) 24px;
  position: relative; isolation: isolate;
}
.back-cover::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: rgb(128 163 191 / 0.58); }
.back-cover p { font-weight: 500; }
.back-cover h2 { margin-bottom: 14px; }
.back-cover p { margin: 0 auto 30px; max-width: 30em; font-size: 19px; }
.back-cover .store { background: #0F0F0F; color: #F2EFE7; }

/* Footer */
.site-footer { padding: 48px 0 56px; color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* Legal pages */
.legal { max-width: 720px; padding-top: clamp(32px, 6vw, 72px); padding-bottom: 24px; }
.legal h1 { font-weight: 900; font-size: clamp(40px, 6vw, 64px); letter-spacing: -0.035em; line-height: 1; margin: 0 0 32px; }
.legal h2 { font-size: 26px; margin: 48px 0 12px; }
.legal h3 { font-size: 19px; margin: 28px 0 6px; }
.legal p, .legal li { color: var(--muted); }
.legal p strong, .legal address { color: var(--ink); }
.legal address { font-style: normal; margin: 0 0 16px; }
.legal .stand { font-size: 15px; margin-top: 48px; }
.legal ul { padding-left: 1.2em; }
