/* Layout and components. Colours come only from tokens.css. */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--text); text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.muted { color: var(--muted); }
.label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--label);
  letter-spacing: 0.02em;
  margin: 0 0 0.9rem;
}

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.site-nav { display: flex; gap: 22px; font-size: 0.95rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

/* Wordmark (option A, provisional until chosen) */
.wordmark { font-family: var(--font-mono); font-size: 1rem; color: var(--text); text-decoration: none; white-space: nowrap; }
.wordmark .cursor { color: var(--accent); }

/* Hero */
.hero {
  padding: clamp(64px, 12vw, 128px) 0 clamp(56px, 9vw, 96px);
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(180deg, var(--hero-glow), var(--bg));
}
.hero h1 { max-width: 15ch; }
.hero .lede { font-size: 1.15rem; color: var(--muted); max-width: 34rem; margin-bottom: 2rem; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px;
  font-size: 0.98rem; font-weight: 600; text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--raised); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); }

/* Sections */
.section { padding: clamp(56px, 9vw, 96px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.hero + .section { padding-top: 8px; }

/* Product list (home) */
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 2rem; }
.product {
  display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 24px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px;
  color: var(--text); text-decoration: none;
}
a.product:hover { border-color: var(--muted); }
.product .app-icon { width: 88px; border-radius: 22.5%; }
.product h3 { font-size: 1.35rem; margin-bottom: 0.3em; }
.product p { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.9rem; }
.product .more { color: var(--accent); font-size: 0.95rem; }
.product .status { display: inline-block; font-family: var(--font-mono); font-size: 0.75rem; color: var(--label);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; margin-bottom: 0.8rem; }
.product-next { background: transparent; border-style: dashed; }
.product-next .status { color: var(--muted); }
.placeholder-icon { width: 88px; height: 88px; border-radius: 22.5%; border: 1px dashed var(--line);
  display: grid; place-items: center; font: 2rem var(--font-mono); color: var(--accent); }
@media (max-width: 420px) { .product { grid-template-columns: minmax(0, 1fr); } }

/* Breadcrumb */
.crumbs { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); margin: 0 0 24px; }
.crumbs a { color: var(--muted); }

/* Small cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 2rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.card h3 { margin-bottom: 0.35em; }
.card p { color: var(--muted); font-size: 0.95rem; margin: 0; }

.small { font-size: 0.88rem; }
code { font-family: var(--font-mono); font-size: 0.9em; color: var(--text); background: var(--raised);
  border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }

/* Product page */
.product-hero .app-icon { width: 112px; border-radius: 22.5%; margin-bottom: 28px; }
.product-hero h1 { margin-bottom: 0.15em; }
.tagline { font-size: clamp(1.2rem, 2.4vw, 1.5rem); margin-bottom: 1rem; }
.note { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); margin: 0; }
.cards-tight { margin-top: 0; }
.card .label { margin-bottom: 0.6rem; }

.shots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 2rem; }
@media (max-width: 900px) { .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .shots { grid-template-columns: minmax(0, 1fr); max-width: 320px; } }
.shots figure { margin: 0; }
.shots img { border-radius: 14px; border: 1px solid var(--line); }
.shots figcaption { color: var(--muted); font-size: 0.88rem; line-height: 1.5; margin-top: 12px; }

.spec { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px 40px; margin-top: 2rem; }
.spec h3 { margin-bottom: 0.3em; }
.spec p { color: var(--muted); font-size: 0.95rem; margin: 0; }

.toolset { list-style: none; padding: 0; margin: 2rem 0 1.25rem; border-top: 1px solid var(--line); }
.toolset li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 12px 0;
  border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; }
.toolset span { font-family: var(--font-mono); font-size: 0.85rem; color: var(--label); padding-top: 2px; }
@media (max-width: 520px) { .toolset li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 48px; }
.plain { padding-left: 1.1em; margin: 0; color: var(--muted); }
.plain li { margin-bottom: 0.4em; }

/* Inner pages */
.page-head { padding: clamp(48px, 8vw, 88px) 0 clamp(40px, 6vw, 64px);
  background: linear-gradient(180deg, var(--hero-glow), var(--bg) 420px); }
.page-head .lede { font-size: 1.1rem; color: var(--muted); max-width: 36rem; margin-bottom: 2rem; }
main.page-head { padding-bottom: clamp(64px, 10vw, 112px); }

.contact-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 40px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px 28px; max-width: 760px; }
.contact-card .label { margin-bottom: 0.3rem; }
.contact-card p.small { margin: 0; }
.contact-email { font-family: var(--font-mono); font-size: 1.15rem; color: var(--accent); text-decoration: none; }
.contact-email:hover { text-decoration: underline; }
@media (max-width: 640px) { .contact-card { grid-template-columns: minmax(0, 1fr); } }

.faq-head { display: flex; align-items: center; gap: 16px; margin-bottom: 1.5rem; }
.faq-head img { width: 48px; border-radius: 22.5%; }
.faq-head .label { margin-bottom: 0.2rem; }
.faq-head h2 { margin: 0; }
.faq { max-width: 760px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 32px 18px 0; position: relative; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-family: var(--font-mono); color: var(--accent); font-size: 1.1rem; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); margin: 0 0 20px; max-width: 64ch; }

.prose { max-width: 760px; }
.prose h2 { font-size: 1.35rem; margin-top: 2.2em; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.7em; }
.prose a { color: var(--text); }
.meta { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); }
.summary { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0; padding: 20px 24px; margin: 1.5rem 0 2rem; }
.summary .label { margin-bottom: 0.4rem; }
.summary p:last-child { margin: 0; color: var(--text); }

.notfound { min-height: 60vh; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 0.88rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 28px; padding-bottom: 28px; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.site-footer .company { font-family: var(--font-mono); }

/* Support: product picker */
.product-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 28px; }
.product-picker .label { margin: 0 6px 0 0; }
.product-picker a { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--text); }
.product-picker a:hover { border-color: var(--accent); }
.product-picker img { width: 32px; border-radius: 22.5%; }

/*
  Accent strength. The site uses data-intensity="bold" on <html>; remove it for the quieter look. Bold
  turns up the studio accent: hero glow, trace, blinking cursor, accent links.
  Product areas (data-product) keep their own accent throughout.
*/
.trace { display: none; }
[data-intensity="bold"] .hero {
  background:
    radial-gradient(ellipse 70% 90% at 15% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(180deg, var(--hero-glow), var(--bg));
}
[data-intensity="bold"] .page-head {
  background:
    radial-gradient(ellipse 70% 90% at 15% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    linear-gradient(180deg, var(--hero-glow), var(--bg) 420px);
}
[data-intensity="bold"] .trace {
  display: block; width: min(560px, 100%); height: 24px; margin: 4px 0 28px;
  fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 60%, transparent));
}
[data-intensity="bold"] .wordmark .cursor { animation: lhl-blink 1.1s steps(1) infinite;
  text-shadow: 0 0 8px color-mix(in srgb, var(--accent) 70%, transparent); }
@keyframes lhl-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { [data-intensity="bold"] .wordmark .cursor { animation: none; } }
[data-intensity="bold"] main a:not(.btn):not(.product) { text-decoration-color: var(--accent); }
[data-intensity="bold"] .card:hover,
[data-intensity="bold"] a.product:hover { border-color: var(--accent); }
[data-intensity="bold"] .btn-primary { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent),
  0 6px 24px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
[data-intensity="bold"] .site-header { border-bottom-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }

/* Q&A blocks (Prinnit support page) */
.qa { padding: 18px 0; border-bottom: 1px solid var(--line); }
.qa:first-of-type { border-top: 1px solid var(--line); margin-top: 1.25rem; }
.qa h3 { font-size: 1.05rem; margin-bottom: 0.35em; }
.qa p { margin: 0; }
.tagline strong { font-weight: 600; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 3rem 0 2rem; }
