/* ============================================================
   ITSMUELLER — Software Schmiede
   Apple-pure: one sans, monochrome, single blue accent.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800;900&family=Geist+Mono:wght@400;500&display=swap');

/* ---------- Tokens ---------- */
:root {
  --font: 'Geist', -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', monospace;

  /* Apple-pure surface palette */
  --page: #f5f5f7;          /* page background = Apple's */
  --tile: #ffffff;           /* light tile */
  --tile-2: #fafafa;
  --ink: #1d1d1f;            /* Apple's ink black */
  --ink-2: #424245;
  --ink-3: #6e6e73;          /* Apple's secondary text */
  --rule: #d2d2d7;           /* Apple's rule */

  /* Single accent — confident blue */
  --link: #0066cc;
  --link-hover: #0055b3;

  /* Dark surface */
  --night: #1d1d1f;
  --night-2: #2c2c2e;
  --night-3: #3a3a3c;
  --night-ink: #f5f5f7;
  --night-ink-2: #a1a1a6;
  --night-link: #2997ff;

  --gap: 14px;               /* gap between tiles */
  --radius: 22px;             /* Apple tile radius */
  --max: 1024px;              /* Apple max width on tile content */

  --ease: cubic-bezier(.2, .7, .15, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  color: var(--ink);
  background: var(--page);
  font-weight: 400;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--link-hover); }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
::selection { background: var(--link); color: #fff; }

/* ---------- Type ---------- */
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
}

.t-hero      { font-size: clamp(2.6rem, 6.8vw, 5.6rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.04; }
.t-display   { font-size: clamp(2rem, 4.8vw, 3.8rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.06; }
.t-title     { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; }
.t-eyebrow   { font-size: clamp(0.92rem, 1.3vw, 1.05rem); font-weight: 500; color: var(--ink); letter-spacing: -0.005em; }
.t-tagline   { font-size: clamp(1.05rem, 1.6vw, 1.3rem); font-weight: 400; color: var(--ink-2); letter-spacing: -0.015em; line-height: 1.4; }
.t-body      { font-size: 1.05rem; line-height: 1.5; color: var(--ink-2); }
.t-small     { font-size: 0.85rem; color: var(--ink-3); }
.t-mono      { font-family: var(--font-mono); font-size: 0.88em; }

.muted { color: var(--ink-3); }
.center { text-align: center; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
}

/* ---------- Nav (Apple — slim, frosted, centered links) ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: rgba(245, 245, 247, 0.82);
  border-bottom: 1px solid rgba(210, 210, 215, 0.5);
  font-size: 0.85rem;
}
.nav-inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.brand {
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.brand:hover { color: var(--link); }
.nav-links {
  display: flex;
  gap: clamp(1rem, 2.4vw, 2rem);
}
.nav-links a {
  color: var(--ink-2);
  font-weight: 400;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
}
.nav-cta {
  font-size: 0.85rem;
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--page);
}
.nav-cta:hover { background: var(--link); color: #fff; }
.nav-toggle {
  display: none;
  width: 28px; height: 28px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--ink);
}

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 44px; left: 0; right: 0;
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    background: var(--page);
    border-bottom: 1px solid var(--rule);
  }
  .nav.open .nav-links a { padding: 0.5rem 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4ch;
  padding: 0.8rem 1.4rem;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background .2s var(--ease), color .2s var(--ease), border .2s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: var(--link); color: #fff; }
.btn-primary:hover { background: var(--link-hover); color: #fff; }
.btn-ink { background: var(--ink); color: var(--page); }
.btn-ink:hover { background: #000; color: #fff; }
.btn-ghost { background: transparent; color: var(--link); border: 1px solid var(--link); }
.btn-ghost:hover { background: var(--link); color: #fff; }
.btn-lg { padding: 0.95rem 1.7rem; font-size: 1.05rem; }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.85rem; }

/* ---------- Apple Link (the "›" caret link) ---------- */
.apple-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.1ch;
  color: var(--link);
  font-size: clamp(1rem, 1.18vw, 1.15rem);
  font-weight: 400;
  letter-spacing: -0.015em;
}
.apple-link::after {
  content: "\00a0\203A";
  display: inline-block;
  transition: transform .2s var(--ease);
}
.apple-link:hover { color: var(--link-hover); }
.apple-link:hover::after { transform: translateX(3px); }
.tile.dark .apple-link { color: var(--night-link); }
.tile.dark .apple-link:hover { color: #6cb3ff; }

/* ---------- Tile Stack (Apple homepage) ---------- */
.tile-stack {
  display: grid;
  gap: var(--gap);
  padding: 0;
}
.tile-row {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr 1fr;
}
.tile-row.tile-row-3 { grid-template-columns: repeat(3, 1fr); }
.tile-row.tile-row-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) {
  .tile-row.tile-row-4 { grid-template-columns: 1fr 1fr; }
  .tile-row.tile-row-3 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .tile-row, .tile-row.tile-row-4, .tile-row.tile-row-3 { grid-template-columns: 1fr; }
}

.tile {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  isolation: isolate;
  background: var(--tile);
  color: var(--ink);
  min-height: 580px;
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2.5rem);
}
.tile.featured { min-height: 88vh; }
.tile.short { min-height: 340px; }
.tile.dark {
  background: var(--night);
  color: var(--night-ink);
}
.tile.dark h1, .tile.dark h2, .tile.dark h3 { color: var(--night-ink); }
.tile.dark .t-tagline { color: var(--night-ink); opacity: 0.85; }
.tile.dark .t-eyebrow { color: var(--night-ink); }

.tile-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 720px;
  margin: 0 auto;
}
.tile-content h1, .tile-content h2 { max-width: 18ch; margin-bottom: 0.4rem; }
.tile-content .t-tagline { max-width: 40ch; margin-bottom: 1.4rem; }
.tile-content .t-eyebrow { margin-bottom: 0.4rem; }

.tile-links {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1rem, 2.5vw, 2.2rem);
  margin-top: 0.4rem;
}

.tile-art {
  margin-top: auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-top: 2rem;
  flex: 1;
}
.tile-art img {
  max-height: 320px;
  max-width: 92%;
  object-fit: contain;
  transition: transform .8s var(--ease);
}
.tile.featured .tile-art img { max-height: 360px; }
.tile:hover .tile-art img { transform: translateY(-4px); }

/* Apple-style icon "shadow" — soft and grounded */
.tile-art img.app-icon {
  filter: drop-shadow(0 24px 28px rgba(0, 0, 0, 0.15));
  border-radius: 22%;
}

/* Badge */
.tile-badge {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink-2);
}
.tile.dark .tile-badge { background: rgba(255, 255, 255, 0.12); color: var(--night-ink-2); }
.tile-badge.live { background: var(--link); color: #fff; }

/* ---------- Detail-page sections ---------- */
.section {
  padding: clamp(4rem, 9vw, 8rem) 0;
  background: var(--page);
}
.section.dark { background: var(--ink); color: var(--night-ink); }
.section.dark h1, .section.dark h2, .section.dark h3 { color: var(--night-ink); }
.section.dark .t-tagline, .section.dark .t-body { color: var(--night-ink-2); }
.section.alt { background: #fff; }

.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(2.5rem, 5vw, 4rem); }
.section-head .t-eyebrow { display: block; margin-bottom: 0.6rem; color: var(--ink-3); }
.section-head h2 { margin-bottom: 1rem; }

/* ---------- Feature grid (detail pages) ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.feature {
  background: #fff;
  border-radius: 18px;
  padding: 1.75rem 1.5rem;
  transition: transform .25s var(--ease);
}
.section.dark .feature { background: var(--night-2); }
.feature:hover { transform: translateY(-3px); }
.feature-num {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
  font-family: var(--font-mono);
}
.section.dark .feature-num { color: var(--night-ink-2); }
.feature h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  letter-spacing: -0.015em;
}
.feature p {
  color: var(--ink-2);
  font-size: 0.96rem;
  line-height: 1.5;
}
.section.dark .feature p { color: var(--night-ink-2); }

/* ---------- Split row ---------- */
.split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
@media (max-width: 820px) { .split-row { grid-template-columns: 1fr; } }

/* ---------- Check list ---------- */
.check-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.check-list li {
  position: relative;
  padding: 0.6rem 0 0.6rem 1.7rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.98rem;
  color: var(--ink-2);
}
.section.dark .check-list li { color: var(--night-ink-2); border-color: var(--night-3); }
.check-list li:last-child { border-bottom: 0; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 1rem;
  width: 12px; height: 7px;
  border-left: 1.5px solid var(--link);
  border-bottom: 1.5px solid var(--link);
  transform: rotate(-45deg);
}

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  max-width: 860px;
  margin: 3rem auto 0;
}
.price-card {
  position: relative;
  background: #fff;
  border-radius: 22px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule);
}
.price-card.featured {
  background: var(--ink);
  color: var(--night-ink);
  border-color: transparent;
}
.price-card.featured h3, .price-card.featured .price-amount { color: var(--night-ink); }
.price-card.featured .check-list li { color: var(--night-ink-2); border-color: var(--night-3); }
.price-card.featured .check-list li::before { border-color: #4ea8ff; }
.price-card h3 {
  font-size: 1.05rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
}
.price-amount-row { display: flex; align-items: baseline; gap: 0.5ch; margin-bottom: 0.4rem; }
.price-amount {
  font-size: clamp(2.4rem, 4.8vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}
.price-period { color: var(--ink-3); font-size: 0.95rem; }
.price-card.featured .price-period { color: var(--night-ink-2); }
.price-strike { color: var(--ink-3); text-decoration: line-through; font-size: 0.9rem; }
.price-sub {
  color: var(--ink-3);
  font-size: 0.93rem;
  margin-bottom: 1.5rem;
  min-height: 2.7em;
}
.price-card.featured .price-sub { color: var(--night-ink-2); }
.price-card .btn { width: 100%; justify-content: center; margin-top: auto; }
.price-card.featured .btn-primary { background: #fff; color: var(--ink); }
.price-card.featured .btn-primary:hover { background: var(--link); color: #fff; }
.price-badge {
  position: absolute;
  top: -0.7rem; left: 1.75rem;
  background: var(--link);
  color: #fff;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 720px; margin: 2.5rem auto 0; border-top: 1px solid var(--rule); }
.faq { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.4rem 0;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--link);
  transition: transform .25s var(--ease);
  font-weight: 300;
  line-height: 1;
}
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { padding: 0 0 1.5rem; color: var(--ink-2); max-width: 60ch; line-height: 1.55; }

/* ---------- Store badges ---------- */
.store-badges { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  background: var(--ink);
  color: var(--page);
  font-size: 0.95rem;
  transition: background .2s var(--ease);
}
.store-badge:hover { background: var(--link); color: #fff; }
.store-badge svg { flex-shrink: 0; }
.store-badge span { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.store-badge small { font-size: 0.62rem; letter-spacing: 0.04em; opacity: 0.85; }
.store-badge strong { font-size: 0.95rem; font-weight: 500; }

/* ---------- Forms ---------- */
.form-grid { max-width: 560px; margin: 2rem auto 0; display: grid; gap: 1rem; }
.form-row { display: grid; gap: 0.4rem; }
.form-row.two { grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row.two { grid-template-columns: 1fr; } }
.form-row label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}
.form-row input, .form-row select, .form-row textarea {
  font: inherit;
  font-size: 1rem;
  padding: 0.8rem 0.95rem;
  border-radius: 10px;
  border: 1px solid var(--rule);
  background: #fff;
  color: var(--ink);
  transition: border .2s var(--ease), box-shadow .2s var(--ease);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--link);
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.12);
}
.form-row textarea { resize: vertical; min-height: 140px; }

/* ---------- Legal pages ---------- */
.legal {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) clamp(1.25rem, 4vw, 2rem);
}
.legal h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1.5rem; font-weight: 600; letter-spacing: -0.03em; }
.legal h2 { font-size: 1.25rem; margin: 2.5rem 0 0.6rem; font-weight: 600; }
.legal p { line-height: 1.6; margin-bottom: 1rem; color: var(--ink-2); }
.legal ul { padding-left: 1.4rem; color: var(--ink-2); }
.legal li { padding: 0.15rem 0; }
.legal a { color: var(--link); }

/* ---------- Footer ---------- */
.footer {
  background: var(--page);
  padding: clamp(2.5rem, 5vw, 4rem) 0 1.5rem;
  margin-top: var(--gap);
  font-size: 0.85rem;
  color: var(--ink-3);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin-bottom: 0.8rem;
  font-weight: 500;
}
.footer a {
  display: block;
  padding: 0.2rem 0;
  color: var(--ink-3);
  font-size: 0.85rem;
}
.footer a:hover { color: var(--ink); }
.footer-brand p { color: var(--ink-3); max-width: 32ch; }
.footer-bottom {
  margin-top: 1.5rem;
  font-size: 0.78rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---------- Scroll reveal (subtle) ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

.tile.reveal.in .t-eyebrow { animation: textIn .9s var(--ease) 0.05s both; }
.tile.reveal.in h1, .tile.reveal.in h2 { animation: textIn .9s var(--ease) 0.12s both; }
.tile.reveal.in .t-tagline { animation: textIn .9s var(--ease) 0.18s both; }
.tile.reveal.in .tile-links { animation: textIn .9s var(--ease) 0.26s both; }
.tile.reveal.in .tile-art { animation: artIn 1.1s var(--ease) 0.2s both; }
@keyframes textIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes artIn {
  from { opacity: 0; transform: translateY(32px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Mockup window (still used on detail pages) ---------- */
.window {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--rule);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.08);
}
.window-bar {
  height: 28px;
  background: var(--tile-2);
  display: flex; align-items: center;
  padding: 0 0.75rem; gap: 0.5rem;
  border-bottom: 1px solid var(--rule);
}
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--rule); }
.dot.red { background: #ff5f57; } .dot.yellow { background: #febc2e; } .dot.green { background: #28c840; }
.window-title { margin: 0 auto; font-size: 0.78rem; color: var(--ink-3); }
.window-body { padding: 1.25rem; font-size: 0.88rem; }
.window-body.dark { background: var(--night-2); color: var(--night-ink); }

/* ---------- Helpers ---------- */
.center { text-align: center; }
.tile.text-left, .tile.text-left .tile-content { text-align: left; align-items: flex-start; }
.tile.no-grow { min-height: auto; }
.tile.pad-tight { padding: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem); }

/* Small inline arrow link variant (for external links) */
.ext-arrow::after {
  content: " ↗";
  font-size: 0.9em;
}
