/* faltwerk.termi.cloud — editorial puzzle zine */

@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  size-adjust: 107.4%;
  ascent-override: 90%;
  descent-override: 22.5%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "JetBrains Mono Fallback";
  src: local("Menlo");
  size-adjust: 100%;
  ascent-override: 94%;
  descent-override: 20%;
  line-gap-override: 0%;
}

:root {
  --bg: #F4EFF6;
  --bg-1: #EFEBF2;
  --bg-2: #E8E3ED;
  --bg-3: #DED6E8;
  --line: rgba(23, 17, 31, 0.09);
  --line-2: rgba(23, 17, 31, 0.14);
  --line-3: rgba(23, 17, 31, 0.22);
  --ink: #17111F;
  --ink-1: #2A2334;
  --ink-2: #6C6570;
  --ink-3: #9B95A0;
  --ink-4: #B0ABB5;
  --lime: #C7F464;
  --lime-dim: #A8D24E;
  --coral: #EF594F;
  --accent: #7048E8;
  --accent-1: #8A66F0;
  --board: #FAF8FC;
  --highlight: rgba(199, 244, 100, 0.12);
  --sans: "Inter", "Inter Fallback", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "JetBrains Mono Fallback", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --radius: 0;
  --measure: 700px;
  --gutter: clamp(24px, 5vw, 44px);
  --cut: 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #100C17;
    --bg-1: #1A1522;
    --bg-2: #201A2A;
    --bg-3: #2A2336;
    --line: rgba(244, 239, 246, 0.08);
    --line-2: rgba(244, 239, 246, 0.14);
    --line-3: rgba(244, 239, 246, 0.22);
    --ink: #F4EFF6;
    --ink-1: #E1DBE8;
    --ink-2: #9B95A0;
    --ink-3: #6C6570;
    --ink-4: #4A4452;
    --board: #1A1522;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
  font-feature-settings: "ss01", "cv01", "cv11";
  position: relative;
  overflow-x: hidden;
}

/* Subtle grid pattern behind content */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

a { color: var(--ink); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent); }
img, svg { display: block; max-width: 100%; }

.container {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  position: relative;
  z-index: 2;
}

/* Cut-corner clip path */
.cut {
  clip-path: polygon(
    0 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% 100%,
    var(--cut) 100%,
    0 calc(100% - var(--cut))
  );
}
.cut-tr {
  clip-path: polygon(
    0 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% 100%,
    0 100%
  );
}

/* ============ Masthead ============ */
.masthead {
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-2);
}
.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.mark {
  font-family: var(--sans);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.mark .dot { color: var(--lime); }

.mast-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 12px;
  font-weight: 500;
}
.mast-nav > a {
  color: var(--ink-2);
  letter-spacing: -0.003em;
}
.mast-nav > a:hover { color: var(--ink); }

/* ============ Page head ============ */
.page { padding-top: clamp(36px, 6vw, 56px); padding-bottom: 40px; position: relative; z-index: 2; }

.page-head {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line-2);
}
.page-head img {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow:
    0 16px 48px rgba(23, 17, 31, 0.18),
    0 0 0 1px var(--line);
}
@media (prefers-color-scheme: dark) {
  .page-head img {
    box-shadow:
      0 16px 48px rgba(0, 0, 0, 0.5),
      0 0 0 1px rgba(255, 255, 255, 0.06);
  }
}
.page-head h1 {
  font-weight: 900;
  font-size: clamp(32px, 5.5vw, 48px);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 6px;
}
.page-head .subtitle {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.page-head .status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime-dim);
}
.page-head .status::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
}
.page-head .status.quiet { color: var(--ink-3); }
.page-head .status.quiet::before { box-shadow: none; background: var(--ink-4); }

@media (max-width: 560px) {
  .page-head { grid-template-columns: 72px 1fr; gap: 16px; }
  .page-head img { width: 72px; height: 72px; border-radius: 16px; }
}

/* ============ Lede ============ */
.lede {
  font-weight: 400;
  font-size: clamp(21px, 2.8vw, 27px);
  line-height: 1.38;
  letter-spacing: -0.012em;
  color: var(--ink);
  max-width: 600px;
  margin: 8px 0 44px;
}
.lede em { font-style: normal; color: var(--accent); }

/* ============ Feature cards ============ */
.section-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-2);
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 48px;
}
.mode-card {
  background: var(--board);
  padding: 20px 18px;
  border: 1px solid var(--line-2);
  position: relative;
  --cut: 14px;
}
.mode-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 40px;
}
.mode-card.m-kampagne::before { background: var(--coral); }
.mode-card.m-daily::before { background: var(--lime); }
.mode-card.m-endless::before { background: var(--accent); }
.mode-idx {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.m-kampagne .mode-idx { color: var(--coral); }
.m-daily .mode-idx { color: var(--lime-dim); }
.m-endless .mode-idx { color: var(--accent); }
.mode-card h3 {
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 6px;
}
.mode-card p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0;
}
@media (max-width: 640px) {
  .mode-grid { grid-template-columns: 1fr; }
}

/* ============ Feature list ============ */
.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 36px;
  margin-bottom: 48px;
}
.feat {
  padding-left: 18px;
  border-left: 2px solid var(--line-2);
}
.feat h3 {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.feat p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; gap: 20px; }
}

/* ============ Unlock preview ============ */
.unlock-strip {
  display: flex;
  gap: 8px;
  margin-bottom: 48px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.unlock-strip::-webkit-scrollbar { display: none; }
.unlock-chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  background: var(--board);
  border: 1px solid var(--line-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ink);
  white-space: nowrap;
  --cut: 10px;
}
.chip-swatch {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.chip-swatch::after {
  content: "";
  position: absolute;
  bottom: 0; right: 0;
  width: 35%; height: 35%;
  background: rgba(0,0,0,0.1);
  clip-path: polygon(100% 0%, 100% 100%, 0% 100%);
}

/* ============ CTA ============ */
.cta-box {
  margin: 0 0 8px;
  padding: 24px 28px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  --cut: 16px;
}
.cta-box-text { flex: 1; min-width: 200px; }
.cta-box-text h3 {
  font-weight: 800;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 4px;
}
.cta-box-text p { color: var(--ink-2); font-size: 14px; margin: 0; }
.cta-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-4);
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  --cut: 8px;
}

/* ============ Contact + footer ============ */
.contact-note {
  color: var(--ink-2);
  font-size: 14px;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line-2);
}
.contact-note a { color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.contact-note a:hover { border-bottom-color: var(--accent); }

.page-foot {
  margin-top: 56px;
  padding: 24px 0 44px;
  border-top: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
.page-foot a { color: var(--ink-3); }
.page-foot a:hover { color: var(--accent); }

/* ============ Body text ============ */
.p { color: var(--ink-2); margin-bottom: 18px; max-width: 62ch; font-size: 16px; line-height: 1.65; }
.p em { font-style: normal; color: var(--ink); font-weight: 500; }

/* ============ Privacy page ============ */
.privacy-h2 {
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 36px 0 10px;
}
.privacy-h3 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
  margin: 20px 0 6px;
}

/* ============ Selection ============ */
::selection { background: var(--lime); color: var(--ink); }

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
