/*
  app.marcturtal.com. Self-contained: does not load the portfolio stylesheet.
  Brand v3 tokens, the same values as web.marcturtal.com (see
  ~/marcturtal-site/PORTFOLIO.md). Light theme only, like the rest of the brand.
  Bump the ?v= stamp on every <link> to this file whenever it changes.
*/
:root {
  --v:       #6d4aff;
  --v-deep:  #4d34d3;
  --v-light: #b9a6ff;
  --v-soft:  #f0ecff;
  --v-line:  #e4dcff;
  --ink:     #1b1340;
  --soft:    #5b5478;
  --faint:   #8b84a6;
  --ground:  #f7f5ff;
  --card:    #ffffff;
  --line:    #e8e4f5;
  --good:    #0fbf7f;
  --good-bg: #e3faf1;
  --dark:    #180f3d;
  --dark-2:  #2b1c73;
  --r-card:  14px;
  --r-small: 10px;
  --wrap:    1120px;
  --gutter:  clamp(16px, 4vw, 32px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--ground);
  color: var(--ink);
  font: 400 16px/1.6 "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--v-deep); }
a:hover { color: var(--v); }
:focus-visible { outline: 3px solid var(--v); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(36px, 6vw, 60px); font-weight: 900; }
h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 800; }
p { max-width: 64ch; }

.kicker {
  display: inline-block;
  font-size: 12px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase;
  color: var(--v);
  margin-bottom: 12px;
}
.lede { font-size: clamp(17px, 2vw, 20px); color: var(--soft); }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(247, 245, 255, .86);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 900; font-size: 17px; white-space: nowrap; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(150deg, var(--v), var(--v-deep));
  display: grid; place-items: center; color: #fff; font-size: 14px; font-weight: 900;
}
.brand span.sub { color: var(--faint); font-weight: 700; }
.top nav { display: flex; gap: 22px; }
.top nav a { text-decoration: none; color: var(--soft); font-weight: 700; font-size: 15px; white-space: nowrap; }
.top nav a:hover { color: var(--v); }
@media (max-width: 560px) { .top nav .opt { display: none; } }
@media (max-width: 430px) { .brand .sub { display: none; } .top nav { gap: 16px; } }

/* ---------- buttons and chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  font: 800 15px/1 "Nunito", sans-serif; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--v); color: #fff; }
.btn-primary:hover { background: var(--v-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--v-line); }
.btn-ghost:hover { border-color: var(--v); color: var(--v-deep); }
.btn-soon { background: var(--v-soft); color: var(--v-deep); border-color: var(--v-line); cursor: default; }
.on-dark .btn-ghost { color: #fff; border-color: rgba(185, 166, 255, .45); }
.on-dark .btn-ghost:hover { border-color: var(--v-light); color: #fff; }
.on-dark .btn-soon { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(185, 166, 255, .45); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 800; white-space: nowrap;
  background: var(--v-soft); color: var(--v-deep);
}
.chip-good { background: var(--good-bg); color: #0a7d54; }
.chip-plain { background: #fff; color: var(--soft); border: 1px solid var(--line); }
.on-dark .chip { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------- dark hero band ---------- */
.on-dark { color: #fff; }
.on-dark .kicker { color: var(--v-light); }
.on-dark .lede { color: rgba(255, 255, 255, .78); }
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(150deg, var(--dark), var(--dark-2));
}
.hero-photo { position: absolute; inset: 0; z-index: -1; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; opacity: .9; }
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(24, 15, 61, .25) 0%, rgba(24, 15, 61, .7) 48%, rgba(24, 15, 61, .94) 100%);
}
.hero .wrap { padding-block: clamp(64px, 10vw, 120px); }
.hero-copy { max-width: 560px; margin-left: auto; }
.hero h1 { margin-bottom: 18px; }
.hero .lede { margin-bottom: 28px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 760px) {
  .hero-photo::after { background: linear-gradient(180deg, rgba(24, 15, 61, .55), rgba(24, 15, 61, .92)); }
  .hero-copy { margin-left: 0; }
}

/* ---------- sections ---------- */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section-head { margin-bottom: 32px; }
.section-head h2 { margin-bottom: 10px; }
.section-tint { background: var(--v-soft); }

/* ---------- app grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 22px; text-decoration: none; color: var(--ink);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
a.card:hover { border-color: var(--v-line); box-shadow: 0 10px 30px -14px rgba(77, 52, 211, .35); transform: translateY(-2px); color: var(--ink); }
.card-head { display: flex; align-items: center; gap: 14px; }
.card h3 { font-size: 19px; }
.card .platform { font-size: 13px; font-weight: 700; color: var(--faint); }
.card p { color: var(--soft); font-size: 15px; flex: 1; }
.card .more { font-weight: 800; font-size: 14px; color: var(--v); }
.card-soon { background: transparent; border-style: dashed; border-color: var(--v-line); }

.icon { width: 56px; height: 56px; flex: none; border-radius: 13px; }
.icon-lg { width: 96px; height: 96px; border-radius: 22px; }
.glyph {
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--v), var(--v-deep));
  color: #fff;
}
.glyph svg { width: 54%; height: 54%; }
.glyph-dark { background: linear-gradient(150deg, var(--dark-2), var(--dark)); }
.glyph-dark svg { color: var(--v-light); }

/* ---------- promise band ---------- */
.promise {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(150deg, var(--dark), var(--dark-2));
  border-radius: 22px; padding: clamp(28px, 5vw, 56px);
}
.promise-photo { position: absolute; inset: 0; z-index: -1; }
.promise-photo img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.promise h2 { margin-bottom: 10px; max-width: 18ch; }
.promise-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; margin-top: 30px; }
.promise-item {
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(185, 166, 255, .22);
  border-radius: var(--r-card); padding: 20px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.promise-item strong { display: block; font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.promise-item span { color: rgba(255, 255, 255, .75); font-size: 15px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 52px 18px 20px; position: relative;
  font-weight: 800; font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 22px; font-weight: 800; color: var(--v);
}
.faq details[open] summary::after { content: "\2212"; }
.faq .a { padding: 0 20px 20px; color: var(--soft); }
.faq .a p + p { margin-top: 10px; }

/* ---------- app page ---------- */
.app-hero .wrap { padding-block: clamp(48px, 8vw, 88px); display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start; }
.app-hero h1 { font-size: clamp(36px, 5.4vw, 54px); margin-bottom: 12px; }
.app-hero .lede { margin-bottom: 18px; }
.app-hero .chips { margin-bottom: 26px; }
.app-hero .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.app-hero .note { font-size: 14px; color: rgba(255, 255, 255, .65); }
@media (max-width: 640px) { .app-hero .wrap { grid-template-columns: 1fr; gap: 20px; } }

.crumb { font-size: 14px; font-weight: 700; margin-bottom: 18px; }
.crumb a { color: var(--v-light); text-decoration: none; }
.crumb a:hover { color: #fff; }

.shots { display: grid; gap: 18px; }
.shot {
  background: var(--v-soft); border: 1px solid var(--v-line); border-radius: var(--r-card);
  overflow: hidden; min-height: 120px;
}
.shot img { width: 100%; height: auto; }
.shot figcaption { padding: 12px 16px; font-size: 14px; color: var(--soft); background: #fff; border-top: 1px solid var(--line); }
.shot-pending {
  display: grid; place-items: center; text-align: center; padding: 48px 20px;
  color: var(--faint); font-weight: 700; border-style: dashed;
}

.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; }
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.feature p { color: var(--soft); font-size: 15px; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 24px; }
.panel h3 { margin-bottom: 14px; }
.panel p { color: var(--soft); }
.panel p + p { margin-top: 10px; }
.facts { list-style: none; display: grid; gap: 0; }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 15px; }
.facts li:first-child { border-top: 0; padding-top: 0; }
.facts li span:first-child { color: var(--soft); }
.facts li span:last-child { font-weight: 800; text-align: right; }
.privacy-panel { background: var(--good-bg); border-color: #bdeed9; }
.privacy-panel h3 { color: #0a7d54; }

.log { list-style: none; border-left: 2px solid var(--v-line); padding-left: 20px; display: grid; gap: 18px; }
.log li { position: relative; }
.log li::before {
  content: ""; position: absolute; left: -27px; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--ground); border: 3px solid var(--v);
}
.log .ver { font-weight: 900; }
.log .when { color: var(--faint); font-weight: 700; font-size: 14px; margin-left: 8px; }
.log p { color: var(--soft); font-size: 15px; margin-top: 2px; }

.fine { font-size: 14px; color: var(--faint); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: var(--v-soft); padding: 1px 6px; border-radius: 6px; color: var(--v-deep); }

/* ---------- prose (privacy page) ---------- */
.prose { max-width: 720px; }
.prose h2 { font-size: 24px; margin: 36px 0 10px; }
.prose p, .prose li { color: var(--soft); }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 20px; display: grid; gap: 6px; margin-top: 10px; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 36px; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; align-items: center; }
.foot p { color: var(--faint); font-size: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot nav a { color: var(--soft); text-decoration: none; font-weight: 700; font-size: 14px; }
.foot nav a:hover { color: var(--v); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
