/* KuroToTo Inc. site. Tokens first; every page sets --accent (studio amber, or the app's colour). */
:root {
  /* Tiny 3D Designer palette on a black base: cream text, wood surfaces, terracotta accent. */
  --bg: #070504;
  --surface: rgba(43, 28, 19, 0.72);   /* wood-shadow family */
  --raised: rgba(74, 47, 32, 0.7);     /* #4a2f20 */
  --border: rgba(251, 240, 217, 0.1);  /* cream */
  --border-strong: rgba(251, 240, 217, 0.24);
  --text: #fffaf0;                     /* cream-light */
  --muted: #cdbf9f;
  --accent: #d0643f;                   /* accent */
  --on-accent: #fffaf0;
  --amber: #f2b54c;
  --teal: #1a9c87;
  --wood: #a8714a;
  --radius: 16px;
  --radius-sm: 10px;
  --display: "Space Grotesk", "Archivo", system-ui, sans-serif;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1080px;
  --measure: 720px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
/* Black gradient blur: soft palette glows behind everything, the page's accent on top. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(46vw 46vw at 12% -6%, color-mix(in srgb, var(--accent) 42%, transparent), transparent 70%),
    radial-gradient(40vw 40vw at 96% 8%, color-mix(in srgb, var(--teal) 30%, transparent), transparent 70%),
    radial-gradient(44vw 44vw at 78% 96%, color-mix(in srgb, var(--amber) 16%, transparent), transparent 70%),
    radial-gradient(38vw 38vw at 4% 88%, color-mix(in srgb, var(--wood) 24%, transparent), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: -1;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(36px, 6vw, 60px); font-weight: 700; }
h2 { font-size: clamp(26px, 3.6vw, 36px); font-weight: 700; }
h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 16px; }
strong { font-weight: 600; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: calc(var(--measure) + 40px); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: 8px; z-index: 10; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font: 700 18px var(--display); letter-spacing: -0.01em; min-height: 44px; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font: 700 16px var(--display); }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; padding: 10px 12px; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center; transition: color .18s, background .18s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--raised); }

/* Hero */
.hero { padding: clamp(56px, 10vw, 120px) 0 clamp(40px, 6vw, 72px); }
.eyebrow { font: 600 13px var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin: 0 0 16px; }
.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 640px; margin: 20px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; font: 600 16px var(--display); text-decoration: none; cursor: pointer; transition: transform .18s, background .18s, border-color .18s; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, white); }
.btn-ghost { color: var(--text); border: 1px solid var(--border-strong); }
.btn-ghost:hover { border-color: var(--text); }
.btn:active { transform: scale(.98); }

section { padding: clamp(40px, 6vw, 72px) 0; }
.section-head { margin-bottom: 28px; }
.section-head p { color: var(--muted); max-width: 620px; margin: 10px 0 0; }

/* App cards */
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.app-card { position: relative; display: flex; flex-direction: column; gap: 14px; height: 100%; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .2s, background .2s, transform .2s; }
.app-card:hover { border-color: color-mix(in srgb, var(--app) 60%, transparent); background: var(--raised); transform: translateY(-2px); }
.app-top { display: flex; align-items: center; gap: 14px; }
.app-icon { width: 60px; height: 60px; border-radius: 14px; flex: none; background: var(--raised); box-shadow: 0 8px 24px color-mix(in srgb, var(--app) 28%, transparent); }
.app-card h3 a { color: var(--text); text-decoration: none; }
.app-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.app-kind { color: var(--muted); font-size: 14px; margin: 2px 0 0; }
.app-card p.blurb { color: var(--muted); font-size: 15.5px; margin: 0; flex: 1; }
.app-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; font: 600 12.5px var(--display); letter-spacing: .02em; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--muted); }
.pill.live { color: var(--app, var(--accent)); border-color: color-mix(in srgb, var(--app, var(--accent)) 50%, transparent); }
.pill.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.mini-links { position: relative; z-index: 1; display: flex; gap: 2px; font-size: 14px; }
.mini-links a { color: var(--muted); padding: 10px 8px; min-height: 44px; display: inline-flex; align-items: center; }
.mini-links a:hover { color: var(--text); }

/* Principles */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.tile { padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.tile svg { width: 26px; height: 26px; color: var(--amber); margin-bottom: 14px; }
.tile p { color: var(--muted); font-size: 15.5px; margin: 8px 0 0; }

/* Contact band */
.band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.band p { color: var(--muted); margin: 6px 0 0; }

/* Document pages (support, privacy) */
.doc-hero { padding: clamp(40px, 7vw, 80px) 0 8px; }
.doc-hero h1 { font-size: clamp(34px, 5vw, 48px); }
.updated { color: var(--muted); font-size: 15px; margin: 12px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 28px 0 0; }
.chips a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500; transition: border-color .18s, background .18s; }
.chips a:hover { border-color: var(--border-strong); background: var(--raised); }
.chips img { width: 30px; height: 30px; border-radius: 8px; }
.doc { padding-top: 24px; }
.doc-app { --accent: var(--app); margin-top: 20px; padding: clamp(20px, 3vw, 32px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); scroll-margin-top: 84px; }
.doc-app-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.doc-app-head img { width: 52px; height: 52px; border-radius: 12px; flex: none; }
.doc-app-head h2 { font-size: 26px; }
.doc-app-head p { color: var(--muted); font-size: 14.5px; margin: 2px 0 0; }
.doc-app h3 { margin: 26px 0 8px; }
.doc-app > p, .doc-app li { color: color-mix(in srgb, var(--text) 86%, var(--muted)); }
.doc-app ul, .doc-app ol { padding-left: 22px; margin: 0 0 16px; }
.doc-app li { margin-bottom: 6px; }
.note { color: var(--muted); font-size: 15px; }
.plain h2 { font-size: 24px; margin: 40px 0 10px; scroll-margin-top: 84px; }

/* FAQ */
details { border-top: 1px solid var(--border); }
details:last-of-type { border-bottom: 1px solid var(--border); }
summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 12px 0; font: 600 17px var(--display); letter-spacing: -0.01em; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; margin-right: 4px; }
details[open] summary::after { transform: rotate(-135deg); }
details > div { padding: 0 0 16px; color: color-mix(in srgb, var(--text) 86%, var(--muted)); }
details > div > :last-child { margin-bottom: 0; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 0 0 16px; }
table { width: 100%; border-collapse: collapse; min-width: 480px; font-size: 15.5px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: 0; }
th { background: rgba(74, 47, 32, 0.45); font: 600 14px var(--display); color: var(--muted); }
td:first-child { font-weight: 500; width: 36%; }

/* App landing */
.app-hero { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
.app-hero .big-icon { width: 124px; height: 124px; border-radius: 28px; box-shadow: 0 24px 70px color-mix(in srgb, var(--accent) 40%, transparent); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.features li { padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.features b { display: block; font: 600 17px var(--display); margin-bottom: 4px; }
.features span { color: var(--muted); font-size: 15.5px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 48px; padding: 32px 0 48px; color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.site-footer a { color: var(--muted); padding: 10px 8px; min-height: 44px; display: inline-flex; align-items: center; }
.site-footer a:hover { color: var(--text); }
.site-footer p { margin: 10px 0 0; }

.reveal { opacity: 0; transform: translateY(14px); animation: rise .5s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (min-width: 760px) {
  .app-hero { grid-template-columns: auto 1fr; gap: 40px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .nav a { padding: 10px 9px; font-size: 14.5px; }
  .brand span.long { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; opacity: 1; transform: none; }
  * { transition: none !important; }
}
