/* Kittori website. Palette, type and motifs come from the app itself
   (apple/Sources/KittoriUI/Theme/Palette.swift, the seal mark and the seigaiha band of
   the app icon). System fonts only; no external requests, scripts or cookies. */
:root {
  --paper: #f6f1e7;
  --paper-raised: #fcfaf5;
  --paper-deep: #ede5d5;
  --line: #ddd2bd;
  --ink: #1f1c18;
  --ink-soft: #4a453d;
  --ink-faint: #6e665a;
  --indigo: #2c3d70;
  --indigo-wash: #e6e9f3;
  --vermilion: #b23a25;
  --vermilion-wash: #f7e2db;
  --moss: #3f6233;
  --moss-wash: #e2ead8;
  --ochre: #855a0f;
  --ochre-wash: #f4e7cb;
  --on-accent: #fcfaf5;
  --seal: #c2412b;
  --shadow: 0 1px 2px rgb(31 28 24 / 0.06), 0 12px 32px -12px rgb(31 28 24 / 0.22);
  --serif: ui-serif, "New York", "Iowan Old Style", "Hiragino Mincho ProN", Georgia, serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --width: 1120px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1a1815;
    --paper-raised: #24211d;
    --paper-deep: #2e2a25;
    --line: #3d3831;
    --ink: #f2ece1;
    --ink-soft: #cfc6b7;
    --ink-faint: #a59c8e;
    --indigo: #a7b5e8;
    --indigo-wash: #262d45;
    --vermilion: #f29079;
    --vermilion-wash: #40241d;
    --moss: #a3c792;
    --moss-wash: #24301f;
    --ochre: #e4bc67;
    --ochre-wash: #3a2e17;
    --on-accent: #1a1815;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 16px 40px -16px rgb(0 0 0 / 0.7);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(1100px 620px at 108% -12%, color-mix(in srgb, var(--vermilion) 7%, transparent), transparent 62%),
    radial-gradient(900px 520px at -12% 104%, color-mix(in srgb, var(--indigo) 7%, transparent), transparent 62%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.18; letter-spacing: 0.002em; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.15rem, 5vw, 3.45rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
/* Long words (Russian, German, Finnish legal terms) wrap instead of widening the page. */
h1, h2, h3, p, li, dd, dt, td, th, summary { overflow-wrap: break-word; hyphens: auto; }
.prose, .faq, .toc { overflow-wrap: anywhere; }
a { color: var(--indigo); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; height: auto; }
code, kbd { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.9em; }
kbd { background: var(--paper-deep); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 0.35em; }

/* Hidden above the page until focused (never pushed sideways: that would scroll right-to-left pages). */
.skip { position: absolute; inset-inline-start: 12px; top: 8px; z-index: 10; transform: translateY(-200%); background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; }
.skip:focus { transform: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(var(--width), 100% - 40px); margin-inline: auto; }

/* Header */
.site-header { border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 16px 0; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 600; font-size: 1.4rem; color: var(--ink); text-decoration: none; }
.brand svg { flex: none; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 4px 6px; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: inline-block; padding: 8px 12px; border-radius: 999px; color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: 0.98rem; }
.site-nav a:hover { color: var(--indigo); background: var(--indigo-wash); }
.site-nav a[aria-current="page"] { color: var(--indigo); background: var(--indigo-wash); }

/* Badges and buttons */
.pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-size: 0.82rem; letter-spacing: 0.01em; padding: 4px 12px; border-radius: 999px; background: var(--indigo-wash); color: var(--indigo); }
.pill-vermilion { background: var(--vermilion-wash); color: var(--vermilion); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 10px; font-weight: 600; text-decoration: none; border: 1px solid transparent; }
.button-primary { background: var(--indigo); color: var(--on-accent); }
.button-primary:hover { background: color-mix(in srgb, var(--indigo) 86%, var(--ink)); }
.button-secondary { background: var(--paper-raised); color: var(--indigo); border-color: color-mix(in srgb, var(--indigo) 35%, transparent); }
.button-secondary:hover { background: var(--indigo-wash); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 20px; }

/* Hero */
.hero { padding: clamp(36px, 6vw, 72px) 0 0; position: relative; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.25fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; font-weight: 700; color: var(--vermilion); margin-bottom: 14px; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.22rem); color: var(--ink-soft); }
.availability { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--ink-soft); font-size: 0.97rem; }
.availability strong { color: var(--ink); }

.showcase { position: relative; padding-bottom: 7%; }
.showcase .frame-mac { width: 100%; }
.showcase .frame-phone { position: absolute; inset-inline-end: -2%; bottom: 0; width: 25%; }

.seigaiha { height: 64px; margin-top: clamp(28px, 5vw, 56px); background: url("/assets/seigaiha-light.svg") repeat left top / 48px 24px; border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }

/* Device frames (drawn with CSS around actual app screenshots) */
.frame-mac img { display: block; width: 100%; border-radius: 12px; box-shadow: var(--shadow); border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); }
.frame-phone { background: #121212; border-radius: 15% / 7%; padding: 3.2%; box-shadow: var(--shadow); border: 1px solid #2a2a2a; }
.frame-phone img { display: block; width: 100%; border-radius: 12% / 5.6%; }
.frame-tablet { background: #121212; border-radius: 4.2% / 5.6%; padding: 2.2%; box-shadow: var(--shadow); border: 1px solid #2a2a2a; }
.frame-tablet img { display: block; width: 100%; border-radius: 2.4% / 3.2%; }

figure { margin: 0; }
figcaption { font-size: 0.86rem; color: var(--ink-faint); margin-top: 12px; }

/* Sections */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-tint { background: color-mix(in srgb, var(--paper-deep) 55%, transparent); border-block: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.section-intro { max-width: 46rem; margin-bottom: clamp(28px, 4vw, 44px); }
.section-intro p { color: var(--ink-soft); font-size: 1.1rem; }

.questions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.question { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 20px; }
.question h3 { font-size: 1.28rem; }
.question p { color: var(--ink-soft); margin: 0; }
.question .mark { display: inline-flex; width: 38px; height: 38px; border-radius: 10px; align-items: center; justify-content: center; background: var(--vermilion-wash); color: var(--vermilion); margin-bottom: 14px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.feature { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature .icon { display: inline-flex; width: 44px; height: 44px; border-radius: 12px; align-items: center; justify-content: center; background: var(--indigo-wash); color: var(--indigo); margin-bottom: 14px; }
.feature p { color: var(--ink-soft); margin: 0; }

.platforms { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.6fr); gap: clamp(20px, 3vw, 36px); align-items: end; }
.platforms .wide { grid-column: 1 / -1; }
.platform-copy { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: clamp(28px, 4vw, 40px); }
.platform-copy h3 { font-size: 1.1rem; margin-bottom: 0.3em; }
.platform-copy p { color: var(--ink-soft); margin: 0; font-size: 0.98rem; }

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; list-style: none; margin: 0; padding: 0; }
.steps li { counter-increment: step; background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.steps li::before { content: counter(step); display: inline-flex; width: 30px; height: 30px; border-radius: 50%; align-items: center; justify-content: center; background: var(--indigo); color: var(--on-accent); font-weight: 700; font-size: 0.92rem; margin-bottom: 12px; }
.steps p { color: var(--ink-soft); margin: 0; }
.note { display: flex; gap: 12px; align-items: flex-start; margin-top: 20px; padding: 14px 16px; border-radius: 12px; background: var(--ochre-wash); color: var(--ink); }
.note svg { flex: none; color: var(--ochre); margin-top: 3px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.checks { list-style: none; padding: 0; margin: 0 0 1.4em; }
.checks li { position: relative; padding-inline-start: 30px; margin-bottom: 10px; color: var(--ink-soft); }
.checks li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 0.5em; width: 14px; height: 8px; border-left: 2.5px solid var(--moss); border-bottom: 2.5px solid var(--moss); transform: rotate(-45deg); }
.checks strong { color: var(--ink); }

.tour-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 520px; justify-self: center; }

/* Pricing */
.price-card { position: relative; background: var(--paper-raised); border: 1px solid var(--line); border-radius: 18px; padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); overflow: hidden; max-width: 760px; }
.price-card::after { content: ""; position: absolute; inset: auto 0 0 0; height: 36px; background: url("/assets/seigaiha-light.svg") repeat left top / 48px 24px; border-top: 1px solid var(--line); }
.price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 10px 0 6px; }
.price { font-family: var(--serif); font-size: clamp(2.8rem, 6vw, 3.6rem); font-weight: 600; line-height: 1; }
.price-label { color: var(--ink-soft); font-size: 1.05rem; }
.price-card .checks { margin-top: 18px; padding-bottom: 28px; }
.fineprint { font-size: 0.9rem; color: var(--ink-faint); }

/* FAQ / long-form pages */
.faq { display: grid; gap: 10px; max-width: 54rem; }
.faq details { background: var(--paper-raised); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; }
.faq summary { cursor: pointer; list-style: none; padding-block: 16px; padding-inline: 0 28px; font-weight: 600; position: relative; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; inset-inline-end: 4px; top: 22px; width: 9px; height: 9px; border-right: 2px solid var(--indigo); border-bottom: 2px solid var(--indigo); transform: rotate(45deg); transition: transform 0.15s ease; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 26px; }
.faq details > div { padding: 0 0 16px; color: var(--ink-soft); }
.faq details > div p:last-child { margin-bottom: 0; }

.page-hero { padding: clamp(40px, 6vw, 72px) 0 clamp(20px, 3vw, 32px); }
.page-hero p { color: var(--ink-soft); font-size: 1.1rem; max-width: 46rem; }
.prose { max-width: 46rem; padding-bottom: clamp(48px, 7vw, 88px); }
.prose h2 { font-size: clamp(1.35rem, 2.4vw, 1.65rem); margin-top: 2.1em; }
.prose h3 { margin-top: 1.6em; }
.prose ul { padding-inline-start: 1.3em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--vermilion); }
.prose .summary { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.prose .summary ul { margin: 0; }
.prose .summary h2 { margin-top: 0; }
.prose .toc { margin: 24px 0 8px; }
.toc { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 22px; margin: 0 0 8px; }
.toc ol { margin: 6px 0 0; padding-inline-start: 1.3em; columns: 2 16rem; column-gap: 32px; }
.toc li { margin-bottom: 4px; break-inside: avoid; }

.contact-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 18px; align-items: start; background: var(--paper-raised); border: 1px solid var(--line); border-radius: 18px; padding: clamp(20px, 3vw, 30px); box-shadow: var(--shadow); max-width: 46rem; margin-bottom: 32px; }
.contact-card .icon { display: inline-flex; width: 48px; height: 48px; border-radius: 12px; align-items: center; justify-content: center; background: var(--indigo-wash); color: var(--indigo); }
.contact-card h2 { margin: 0 0 0.25em; font-size: 1.45rem; }
.email { font-size: 1.15rem; font-weight: 650; overflow-wrap: anywhere; }

table.facts { width: 100%; border-collapse: collapse; margin: 0 0 1em; background: var(--paper-raised); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.facts th, .facts td { text-align: start; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.facts th { width: 34%; font-weight: 600; color: var(--ink); }
.facts td { color: var(--ink-soft); }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--ink-faint); font-size: 0.92rem; }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px 48px; }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 8px 28px; }
.site-footer a { color: var(--ink-soft); }
.site-footer .brand { font-size: 1.15rem; margin-bottom: 8px; }
.site-footer p { margin: 0 0 0.6em; }

.not-found { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 64px 0; }

@media (max-width: 900px) {
  .hero .wrap, .split, .platforms { grid-template-columns: 1fr; }
  .questions, .steps, .platform-copy { grid-template-columns: 1fr; }
  .showcase { padding-bottom: 10%; margin-inline-end: 6%; }
  .showcase .frame-phone { inset-inline-end: -6%; width: 30%; }
  .platforms .phone { max-width: 300px; justify-self: center; width: 70%; }
  .site-footer .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 1rem; }
  .site-header .wrap { padding: 12px 0; }
  .site-nav a { padding: 8px 10px; }
  .tour-shots { grid-template-columns: 1fr 1fr; gap: 12px; }
  .actions .button { flex: 1 1 100%; }
  .facts th { width: auto; display: block; border-bottom: 0; padding-bottom: 2px; }
  .facts td { display: block; padding-top: 0; }
}
@media (prefers-color-scheme: dark) {
  .seigaiha, .price-card::after { background-image: url("/assets/seigaiha-dark.svg"); }
}
@media (forced-colors: active) {
  .pill, .button, .feature .icon, .question .mark { border: 1px solid CanvasText; }
}
@media print {
  .site-header nav, .seigaiha, .skip { display: none; }
  body { background: none; }
}

/* Language picker: a native disclosure with plain links (works without JavaScript). */
.lang-picker { position: relative; }
.lang-picker summary { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; color: var(--ink-soft); font-weight: 500; cursor: pointer; list-style: none; }
.lang-picker summary::-webkit-details-marker { display: none; }
.lang-picker summary:hover, .lang-picker[open] summary { color: var(--indigo); background: var(--indigo-wash); }
.lang-picker summary:focus-visible, .lang-list a:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }
.lang-list { position: absolute; inset-inline-end: 0; z-index: 10; margin: 6px 0 0; padding: 8px; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(10rem, 1fr)); gap: 2px 8px;
  max-height: min(70vh, 32rem); overflow: auto; background: var(--paper, #fffdf8); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgb(0 0 0 / 0.12); }
.lang-list a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; text-align: start; }
.lang-list a:hover { background: var(--indigo-wash); color: var(--indigo); }
.lang-list a[aria-current="true"] { font-weight: 700; color: var(--indigo); }
@media (max-width: 560px) { .lang-list { grid-template-columns: 1fr; inset-inline-end: auto; inset-inline-start: 0; } }
.lang-fallback { width: min(var(--width), 100% - 40px); margin: 16px auto 0; padding: 10px 14px; border-radius: 10px; background: var(--indigo-wash); color: var(--ink); }
.legal-notice { margin-block: 20px; padding-block: 14px; padding-inline: 18px; border-radius: 12px; border: 1px solid var(--line); border-inline-start: 4px solid var(--ochre); background: var(--ochre-wash); color: var(--ink); }
.legal-notice p:last-child { margin-bottom: 0; }
/* Right-to-left pages mirror direction-dependent layout; logical properties above already follow dir. */
[dir="rtl"] .checks li, [dir="rtl"] .faq, [dir="rtl"] .section-intro { text-align: start; }
