/* Nightfang Studio — shared styles for nightfang.de and moonbite.nightfang.de */

@font-face {
  font-family: "Nunito";
  src: url(/assets/fonts/nunito.woff2) format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --night: #2b1653;
  --night-deep: #1f1040;
  --ink: #1a1030;
  --moon: #ffe08a;
  --lavender: #c7b2ff;
  --violet: #6a3fd6;
  --cream: #fff7ee;
  --accent: #ff4d6d;

  --radius: 22px;
  --border: 3px solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);
  --gutter: 16px;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--night);
  color: var(--cream);
  font-family: ui-rounded, "Nunito", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

main { flex: 1; }

img, svg { max-width: 100%; height: auto; }

a { color: var(--lavender); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--moon); }
a:focus-visible, .button:focus-visible, .card:focus-visible {
  outline: 3px solid var(--moon);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-weight: 900;
  line-height: 1.15;
  color: var(--moon);
  text-shadow: 3px 3px 0 var(--ink);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.2rem, 8vw, 3.6rem); letter-spacing: .01em; }
h2 { font-size: clamp(1.5rem, 5vw, 2.1rem); }
h3 { font-size: 1.25rem; }

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

/* Header */
.site-header { padding: 22px 0 8px; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.site-header .logo { display: inline-block; line-height: 0; }
.site-header .logo img { height: 46px; width: auto; }
.site-header .deco { width: 44px; flex: none; }
.logo--app { display: inline-flex !important; align-items: center; gap: 10px; text-decoration: none; line-height: 1 !important; }
.logo--app img { width: 40px; height: 40px; border-radius: 10px; border: var(--border); }
.logo--app span { font-weight: 900; font-size: 1.6rem; color: var(--moon); text-shadow: 3px 3px 0 var(--ink); }

/* Hero */
.hero { padding: 40px 0 28px; position: relative; }
.hero p.lead { font-size: 1.2rem; max-width: 34ch; margin: 0 0 24px; }
.hero .app-icon {
  width: 104px; height: 104px;
  border-radius: 24px;
  border: var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  display: block;
}
.hero .deco-bat { position: absolute; right: 0; top: 18px; width: 96px; transform: rotate(8deg); opacity: .95; }

section { padding: 28px 0; }

/* Comic panel */
.panel {
  background: var(--night-deep);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
}
.panel > :last-child { margin-bottom: 0; }

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 22px;
}
.card {
  display: flex;
  gap: 16px;
  align-items: center;
  text-decoration: none;
  color: var(--cream);
  background: var(--night-deep);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card img { width: 72px; height: 72px; border-radius: 18px; border: var(--border); flex: none; }
.card h3 { margin: 0 0 4px; }
.card p { margin: 0; color: var(--lavender); font-size: .98rem; line-height: 1.4; }
.card:hover { color: var(--cream); background: var(--violet); }
@media (prefers-reduced-motion: no-preference) {
  .card, .button { transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
  .card:hover, a.button:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--ink);
  background: var(--moon);
  border: var(--border);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 12px 24px;
  text-decoration: none;
}
a.button:hover { color: var(--ink); }
.button--disabled { background: var(--lavender); cursor: default; }

/* Screenshot frames */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(42vw, 180px), 220px));
  justify-content: start;
  gap: 20px;
}
.shot {
  aspect-ratio: 9 / 19.5;
  border: var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  background: var(--night-deep);
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--lavender);
  font-weight: 800;
  padding: 16px;
  overflow: hidden;
}
.shot img { width: 100%; height: 100%; object-fit: cover; }

/* Feature list */
.features { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.features .panel h3 { font-size: 1.15rem; }
.features .panel p { margin: 0; }

/* Long text */
.prose { max-width: 68ch; }
.prose h2 { font-size: 1.45rem; margin-top: 1.6em; }
.prose p, .prose li { color: var(--cream); }
.prose .updated { color: var(--lavender); font-size: .95rem; }

/* Footer */
.site-footer {
  margin-top: 48px;
  padding: 26px 0 34px;
  border-top: var(--border);
  background: var(--night-deep);
  font-size: .98rem;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.site-footer a { color: var(--cream); font-weight: 800; text-decoration: none; }
.site-footer a:hover { color: var(--moon); text-decoration: underline; }
.site-footer .small { margin: 12px 0 0; color: var(--lavender); font-size: .9rem; }

/* 404 + forwarder */
.center-page { text-align: center; padding: 64px 0; }
.center-page .deco-moon { width: 96px; margin: 0 auto 18px; display: block; }
.center-page p { margin: 0 auto 22px; max-width: 40ch; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (max-width: 560px) {
  .site-header .logo img { height: 36px; }
  .hero .deco-bat { width: 64px; top: 0; }
  .panel { padding: 16px 18px; }
}

/* ---------- Revision 2: fuller pages ---------- */

.hero--split { display: grid; gap: 36px; align-items: center; padding-top: 28px; }
@media (min-width: 860px) { .hero--split { grid-template-columns: 1.1fr .9fr; } }
.hero .kicker {
  display: inline-block; font-weight: 900; font-size: .85rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--lavender); margin-bottom: 10px;
}
.hero h1 .hl { color: var(--cream); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.button--ghost { background: transparent; color: var(--cream); }
a.button--ghost:hover { color: var(--moon); }

.badge {
  display: inline-block; font-weight: 900; font-size: .8rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink); background: var(--moon);
  border: 2px solid var(--ink); border-radius: 999px; padding: 2px 10px;
}
.badge--soft { background: var(--lavender); }

/* Tilted phones */
.phones { position: relative; height: 440px; max-width: 420px; margin: 0 auto; width: 100%; }
.phone {
  position: absolute; width: 200px; aspect-ratio: 600 / 1304;
  border: 4px solid var(--ink); border-radius: 30px; box-shadow: 8px 8px 0 var(--ink);
  overflow: hidden; background: #000;
}
.phone img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phone--back { left: 6%; top: 18px; transform: rotate(-7deg); }
.phone--front { right: 6%; top: 0; transform: rotate(6deg); }
@media (max-width: 480px) {
  .phones { height: 360px; }
  .phone { width: 160px; }
}

/* Promise panels */
.promise { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.promise .panel { position: relative; padding-top: 26px; }
.promise .panel img { position: absolute; right: 14px; top: -22px; width: 56px; height: auto; }
.promise .panel:nth-child(2) img { transform: rotate(-12deg); }
.promise .panel h3 { font-size: 1.4rem; }
.promise .panel p { margin: 0; color: var(--cream); }

/* App feature card (studio page) */
.app-feature {
  display: grid; gap: 24px; align-items: center;
  background: var(--night-deep); border: var(--border); border-radius: 28px;
  box-shadow: 8px 8px 0 var(--ink); padding: 26px; overflow: hidden;
}
@media (min-width: 760px) { .app-feature { grid-template-columns: 1fr 220px; padding: 34px 40px; } }
.app-feature .app-head { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.app-feature .app-head img { width: 84px; height: 84px; border-radius: 20px; border: var(--border); box-shadow: 4px 4px 0 var(--ink); }
.app-feature h3 { font-size: 2rem; margin: 0 0 4px; }
.app-feature p { color: var(--cream); }
.app-feature ul { margin: 0 0 20px; padding-left: 1.1em; color: var(--cream); }
.app-feature .phone { position: static; width: 100%; max-width: 220px; margin: 0 auto; transform: rotate(4deg); }

/* Feature grid */
.feature-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.feature-grid .panel h3 { font-size: 1.15rem; margin-bottom: .35em; }
.feature-grid .panel p { margin: 0; font-size: .98rem; }

/* Gallery */
.gallery {
  display: grid; gap: 20px; padding: 8px 0 22px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.gallery figure { margin: 0; min-width: 0; }
.gallery .phone { position: static; width: 100%; box-shadow: 5px 5px 0 var(--ink); border-radius: 26px; }
.gallery figcaption { text-align: center; font-weight: 800; color: var(--lavender); margin-top: 10px; font-size: .95rem; }
.credit { color: var(--lavender); font-size: .85rem; max-width: 70ch; }

/* What leaves your phone */
.leaves { width: 100%; border-collapse: separate; border-spacing: 0; }
.leaves th, .leaves td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 2px solid var(--night); }
.leaves th { color: var(--moon); font-weight: 900; }
.leaves tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
@media (max-width: 600px) {
  .leaves thead { display: none; }
  .leaves tr { display: block; padding: 10px 0; border-bottom: 2px solid var(--night); }
  .leaves td { display: block; border: 0; padding: 2px 6px; }
  .leaves td:first-child { font-weight: 900; color: var(--moon); }
}

/* FAQ */
.faq { display: grid; gap: 14px; max-width: 760px; }
.faq details { background: var(--night-deep); border: var(--border); border-radius: 18px; box-shadow: 4px 4px 0 var(--ink); padding: 14px 20px; }
.faq summary { cursor: pointer; font-weight: 900; font-size: 1.1rem; color: var(--moon); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--lavender); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; }

/* Call to action */
.cta { text-align: center; padding: 34px 22px; }
.cta p { max-width: 46ch; margin: 0 auto 20px; }
.cta .actions { justify-content: center; }

.section-intro { max-width: 56ch; color: var(--lavender); margin: -4px 0 22px; }
