/* ==========================================================================
   Extremely Successful Apps — Holger Krupp
   Static site styles
   ========================================================================== */

:root {
  --bg:            #07070b;
  --bg-elev:       #101018;
  --bg-card:       #14141f;
  --bg-card-hover: #1a1a29;
  --border:        rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text:          #f4f4f7;
  --text-dim:      #a9a9b8;
  --text-faint:    #74748a;
  --accent:        #6c8cff;
  --radius:        22px;
  --radius-sm:     14px;
  --maxw:          1120px;
  --shadow:        0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
          Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:            #f6f6f9;
    --bg-elev:       #ffffff;
    --bg-card:       #ffffff;
    --bg-card-hover: #ffffff;
    --border:        rgba(9, 9, 20, 0.10);
    --border-strong: rgba(9, 9, 20, 0.18);
    --text:          #14141b;
    --text-dim:      #55555f;
    --text-faint:    #8a8a97;
    --shadow:        0 24px 55px -28px rgba(20, 20, 40, 0.35);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

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

/* ---------- Nav ---------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand-mark {
  width: 36px; height: 36px; flex: none;
  background-color: currentColor;
  -webkit-mask: url(assets/logo-mark.png) center / contain no-repeat;
  mask: url(assets/logo-mark.png) center / contain no-repeat;
}
.brand-word {
  font-weight: 350;
  font-size: 14px;
  line-height: 1.02;
  letter-spacing: 0.005em;
  text-transform: lowercase;
  white-space: nowrap;
}
.brand-word b { font-weight: 600; }
@media (max-width: 420px) { .brand-word { font-size: 12.5px; } .brand-mark { width: 32px; height: 32px; } }
.nav-links { display: flex; gap: 26px; align-items: center; font-size: 15px; }
.nav-links a { color: var(--text-dim); transition: color .18s; }
.nav-links a:hover { color: var(--text); }
.nav-links .gh { color: var(--text); }
@media (max-width: 680px) { .nav-links a:not(.gh) { display: none; } }

/* ---------- Hero --------------------------------------------------------- */
.hero { position: relative; padding: 96px 0 40px; text-align: center; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute; inset: -30% 0 auto 0; height: 620px;
  background:
    radial-gradient(600px 340px at 30% 10%, rgba(108,140,255,.20), transparent 60%),
    radial-gradient(560px 320px at 78% 0%, rgba(255,95,109,.16), transparent 60%),
    radial-gradient(520px 360px at 55% 40%, rgba(71,207,115,.12), transparent 65%);
  filter: blur(6px);
  z-index: 0;
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-dim);
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px;
  margin-bottom: 26px;
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 750;
  margin: 0 auto 22px;
  max-width: 15ch;
}
.hero h1 .grad {
  background: linear-gradient(100deg, #ff5f6d, #ffc371 32%, #47cf73 55%, #35c3d6 72%, #6c8cff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead {
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  color: var(--text-dim);
  max-width: 60ch; margin: 0 auto 34px;
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 22px; border-radius: 999px;
  font-size: 15px; font-weight: 600;
  border: 1px solid var(--border-strong);
  color: var(--text);
  transition: transform .16s ease, background .18s, border-color .18s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover { opacity: .92; }
.btn-ghost:hover { background: var(--bg-card); border-color: var(--border-strong); }

/* floating icon row */
.icon-strip {
  display: flex; justify-content: center; gap: 18px; flex-wrap: wrap;
  margin-top: 58px;
}
.icon-strip img {
  width: 68px; height: 68px; border-radius: 16px;
  box-shadow: 0 12px 26px -10px rgba(0,0,0,.55);
  transition: transform .22s ease;
}
.icon-strip a:hover img { transform: translateY(-6px) scale(1.06); }
@media (max-width: 520px) { .icon-strip img { width: 54px; height: 54px; border-radius: 13px; } }

/* ---------- Sections ----------------------------------------------------- */
section { position: relative; }
section[id], article[id], #top { scroll-margin-top: 84px; }
.section-pad { padding: 74px 0; }
.section-head { max-width: 44ch; margin-bottom: 46px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .kicker {
  font-size: 13px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent, var(--text-dim));
}
.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  letter-spacing: -0.025em; font-weight: 720; margin: 10px 0 12px; line-height: 1.1;
}
.section-head p { color: var(--text-dim); font-size: 1.05rem; margin: 0; }

.divider { height: 1px; background: var(--border); border: 0; margin: 0; }

/* ---------- Featured app ------------------------------------------------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 54px;
  align-items: center;
  padding: 64px 0;
}
.feature + .feature { border-top: 1px solid var(--border); }
.feature:nth-child(even) .feature-copy { order: 2; }
.feature-media { min-width: 0; }

.app-eyebrow { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.app-eyebrow img {
  width: 62px; height: 62px; border-radius: 15px;
  box-shadow: 0 10px 22px -10px rgba(0,0,0,.5);
}
.app-eyebrow .meta { display: flex; flex-direction: column; }
.app-eyebrow .name { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.app-eyebrow .tags { font-size: 13px; color: var(--text-faint); display: flex; gap: 8px; align-items: center; }
.pill {
  display: inline-block; font-size: 11px; font-weight: 650; letter-spacing: .03em;
  padding: 3px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: color-mix(in srgb, var(--accent) 92%, var(--text));
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
.pill.soon { background: rgba(255,255,255,.06); color: var(--text-dim); border-color: var(--border-strong); }

.feature-copy h3 { font-size: 1.15rem; font-weight: 600; margin: 0 0 12px; color: var(--text); }
.feature-copy .tagline {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.25; letter-spacing: -0.02em; font-weight: 650;
  margin: 0 0 22px;
}
.feat-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 11px; }
.feat-list li { display: flex; gap: 11px; align-items: flex-start; color: var(--text-dim); font-size: 15.5px; }
.feat-list li::before {
  content: ""; flex: none; margin-top: 8px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}
.feat-list li b { color: var(--text); font-weight: 600; }

.app-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.appstore-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--text); color: var(--bg);
  padding: 11px 18px 11px 16px; border-radius: 13px; font-weight: 600; font-size: 14.5px;
  transition: transform .16s, opacity .16s;
}
.appstore-badge:hover { transform: translateY(-2px); }
.appstore-badge small { display: block; font-size: 10px; font-weight: 500; opacity: .7; line-height: 1; margin-bottom: 2px; }
.appstore-badge .lbl { line-height: 1.05; }
.link-src {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 550; color: var(--text-dim);
  padding: 11px 16px; border: 1px solid var(--border-strong); border-radius: 13px;
  transition: color .16s, border-color .16s;
}
.link-src:hover { color: var(--text); border-color: var(--accent); }

/* screenshot rails */
.shots {
  display: flex; gap: 16px; overflow-x: auto; padding: 6px 2px 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.shots::-webkit-scrollbar { height: 7px; }
.shots::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }

.phone {
  flex: none; scroll-snap-align: center;
  width: 214px;
  border-radius: 32px;
  padding: 9px;
  background: linear-gradient(160deg, #2a2a34, #16161d);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,.06);
}
.phone img { border-radius: 24px; aspect-ratio: 9 / 19.5; object-fit: cover; width: 100%; background: var(--bg-elev); }

.mac {
  flex: none; scroll-snap-align: center;
  width: 460px; max-width: 82vw;
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}
.mac .bar {
  height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 14px;
  background: color-mix(in srgb, var(--bg-elev) 80%, #000);
  border-bottom: 1px solid var(--border);
}
.mac .bar i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.mac .bar i:nth-child(1){ background:#ff5f57;} .mac .bar i:nth-child(2){ background:#febc2e;} .mac .bar i:nth-child(3){ background:#28c840;}
.mac img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

.feature.single { grid-template-columns: 1fr; text-align: center; }
.feature.single .app-eyebrow { justify-content: center; }
.feature.single .feat-list { max-width: 620px; margin-inline: auto; text-align: left; }
.feature.single .app-actions { justify-content: center; }
.feature.single .shots { justify-content: flex-start; }

/* ---------- Platform band (ToolTogether) --------------------------------- */
.platform-band {
  background:
    radial-gradient(760px 420px at 12% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 68%),
    radial-gradient(620px 400px at 100% 100%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.platform-band .feature { border-top: 0; padding-bottom: 34px; }
.platform-eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 90%, var(--text));
  margin-bottom: 8px;
}
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { filter: brightness(1.07); }

.steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  padding: 4px 0 56px;
}
.step { display: flex; gap: 14px; align-items: flex-start; }
.step .num {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: color-mix(in srgb, var(--accent) 92%, var(--text));
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}
.step h4 { margin: 3px 0 5px; font-size: 15.5px; font-weight: 650; }
.step p { margin: 0; font-size: 14px; color: var(--text-dim); line-height: 1.5; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 18px; padding: 8px 0 40px; } }

/* ---------- Compact grid (more apps) ------------------------------------- */
.grid-apps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.mini {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  transition: transform .18s, border-color .18s, background .18s;
}
.mini:hover { transform: translateY(-3px); border-color: var(--border-strong); background: var(--bg-card-hover); }
.mini img { width: 54px; height: 54px; border-radius: 13px; flex: none; box-shadow: 0 8px 16px -8px rgba(0,0,0,.5); }
.mini .name { font-weight: 650; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.mini .cat { font-size: 12.5px; color: var(--text-faint); margin: 1px 0 7px; }
.mini p { margin: 0; font-size: 14px; color: var(--text-dim); line-height: 1.5; }

/* ---------- Open source -------------------------------------------------- */
.repo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.repo {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 22px;
  transition: transform .18s, border-color .18s;
}
.repo:hover { transform: translateY(-3px); border-color: var(--accent); }
.repo .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.repo .rname { font-weight: 650; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 15px; letter-spacing: -0.01em; }
.repo .star { font-size: 13px; color: var(--text-faint); display: inline-flex; align-items: center; gap: 4px; }
.repo p { margin: 0 0 12px; font-size: 14px; color: var(--text-dim); }
.repo .lang { font-size: 12.5px; color: var(--text-faint); display: inline-flex; align-items: center; gap: 6px; }
.repo .lang::before { content:""; width: 10px; height: 10px; border-radius: 50%; background: #f05138; }

/* ---------- API / Database ------------------------------------------------ */
.api-grid { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 44px; align-items: start; }
.api-copy h3 { font-size: 1.2rem; font-weight: 650; margin: 0 0 12px; letter-spacing: -0.01em; }
.api-copy p { color: var(--text-dim); margin: 0 0 18px; }
.fields { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.fields li { font-size: 14.5px; color: var(--text-dim); }
.fields code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text); padding: 1px 7px; border-radius: 6px; font-size: 0.88em;
}
.api-cta { font-size: 15px; color: var(--text); }
.api-cta a { color: var(--accent); font-weight: 600; }
.api-cta a:hover { text-decoration: underline; }

.code-block {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 16px;
}
.code-head {
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px; color: var(--text-faint); letter-spacing: .02em;
  padding: 11px 16px; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-card) 72%, #000);
}
.code-head .method {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  background: color-mix(in srgb, #47cf73 22%, transparent);
  color: color-mix(in srgb, #47cf73 90%, var(--text));
  border: 1px solid color-mix(in srgb, #47cf73 45%, transparent);
  font-weight: 700; font-size: 11px; padding: 2px 8px; border-radius: 6px;
}
.code-block pre {
  margin: 0; padding: 16px; overflow-x: auto;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px; line-height: 1.6; color: var(--text);
}
.code-block pre code { white-space: pre; }
@media (max-width: 820px) { .api-grid { grid-template-columns: 1fr; gap: 26px; } }

/* try-it widget */
.tryit {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 18px; margin-bottom: 16px;
}
.tryit-label { font-size: 12.5px; color: var(--text-faint); letter-spacing: .02em; margin-bottom: 10px; }
.tryit-form { display: flex; gap: 10px; }
.tryit-input {
  flex: 1; min-width: 0;
  background: var(--bg); border: 1px solid var(--border-strong);
  color: var(--text); border-radius: 11px; padding: 12px 14px;
  font-size: 15px; font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.tryit-input::placeholder { color: var(--text-faint); }
.tryit-input:focus { outline: none; border-color: var(--accent); }
.tryit-btn {
  flex: none; border: 0; border-radius: 11px; padding: 12px 20px;
  background: var(--text); color: var(--bg); font-weight: 600; font-size: 15px;
  cursor: pointer; transition: opacity .15s;
}
.tryit-btn:hover { opacity: .9; }
.tryit-btn:disabled { opacity: .5; cursor: default; }
.tryit-hint { font-size: 13px; color: var(--text-faint); margin-top: 11px; }
.tryit-hint button {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--accent); font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px;
}
.tryit-hint button:hover { text-decoration: underline; }
.tryit-results { margin-top: 15px; display: grid; gap: 9px; }
.result {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 11px; padding: 11px 13px;
}
.result .r-name { font-weight: 650; letter-spacing: -0.01em; }
.result .r-plat { font-size: 13.5px; color: var(--text-dim); }
.result .r-badge {
  margin-left: auto; font-size: 11px; font-weight: 650; letter-spacing: .04em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  background: color-mix(in srgb, #47cf73 18%, transparent);
  color: color-mix(in srgb, #47cf73 90%, var(--text));
  border: 1px solid color-mix(in srgb, #47cf73 40%, transparent);
}
.tryit-msg { font-size: 14px; color: var(--text-dim); padding: 3px 1px; }
.tryit-msg.err { color: #e5735f; }
.tryit-raw { margin-top: 5px; }
.tryit-raw summary { cursor: pointer; font-size: 13px; color: var(--text-faint); }
.tryit-raw pre {
  margin: 9px 0 0; background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px; overflow-x: auto;
  font-size: 12.5px; line-height: 1.55; font-family: ui-monospace, "SF Mono", Menlo, monospace; color: var(--text);
}

/* ---------- About / footer ----------------------------------------------- */
.about { text-align: center; }
.about .wrap { max-width: 760px; }
.about p { font-size: clamp(1.05rem, 2.1vw, 1.32rem); color: var(--text-dim); line-height: 1.65; }
.about p b { color: var(--text); font-weight: 600; }
.about-tags { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.about-tags span {
  font-size: 13.5px; color: var(--text-dim);
  padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px;
}

footer { border-top: 1px solid var(--border); padding: 46px 0 60px; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.foot-links { display: flex; gap: 24px; flex-wrap: wrap; }
.foot-links a { color: var(--text-dim); font-size: 15px; transition: color .16s; }
.foot-links a:hover { color: var(--text); }
.foot-copy { color: var(--text-faint); font-size: 13.5px; }

/* ---------- Legal / Impressum -------------------------------------------- */
.legal { padding: 56px 0 30px; }
.legal .wrap { max-width: 740px; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.7rem); letter-spacing: -0.025em; margin: 0 0 10px; }
.legal .lede { color: var(--text-dim); margin: 0 0 8px; }
.legal h2 {
  font-size: 1.1rem; font-weight: 650; letter-spacing: -0.01em;
  margin: 36px 0 10px; padding-top: 22px; border-top: 1px solid var(--border);
}
.legal h2:first-of-type { border-top: 0; padding-top: 0; }
.legal p { color: var(--text-dim); margin: 0 0 12px; }
.legal address { font-style: normal; color: var(--text); line-height: 1.95; }
.legal a { color: var(--accent); }
.legal a:hover { text-decoration: underline; }
.todo {
  display: inline-block;
  background: color-mix(in srgb, #ffcf5a 20%, transparent);
  border: 1px dashed color-mix(in srgb, #ffcf5a 70%, var(--text-faint));
  color: var(--text);
  padding: 1px 9px; border-radius: 6px; font-size: 0.92em; font-weight: 500;
}

/* ---------- Reveal on scroll --------------------------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive --------------------------------------------------- */
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 30px; padding: 48px 0; }
  .feature:nth-child(even) .feature-copy { order: 0; }
  .feature-media { order: -1; }
  .feature.single .feature-media { order: 0; }
}
