/* karriapps.com.au — Karri Apps studio site. Mobile first, no JavaScript. */

@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/sourcesans-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1c2420;
  --ink-soft: #4a5550;
  --paper: #f7f3ec;
  --card: #ffffff;
  --line: #e4dccf;
  --gum: #1f4d3a;
  --gum-dark: #163a2b;
  --gum-soft: #e4efe8;
  --bark: #b5562f;
  --bark-soft: #f8e7dc;
  --sand: #f2c88a;
  --radius: 20px;
  --shadow: 0 18px 48px rgba(31, 77, 58, 0.12);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --max: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gum); text-underline-offset: 3px; }
a:hover { color: var(--bark); }
:focus-visible { outline: 3px solid var(--bark); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 7.5vw, 3.6rem); font-weight: 650; }
h2 { font-size: clamp(1.6rem, 4.6vw, 2.3rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -60px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 12px; }

.site-header { border-bottom: 1px solid var(--line); background: rgba(247, 243, 236, 0.98); position: sticky; top: 0; z-index: 20; }
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 750; font-size: 1.1rem; }
.brand img { width: 34px; height: 34px; }
.nav { display: flex; gap: 18px; }
.nav a { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 0.98rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gum); }
.nav .nav-wide { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px; border-radius: 999px;
  background: var(--gum); color: #fff; font-weight: 700; text-decoration: none;
  border: 2px solid var(--gum); transition: background 0.15s;
}
.btn:hover { background: var(--gum-dark); border-color: var(--gum-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--gum); }
.btn-ghost:hover { background: var(--gum-soft); color: var(--gum-dark); }
.play-badge { display: inline-block; line-height: 0; border-radius: 10px; }
.play-badge img { width: 180px; }
.play-soon { display: inline-flex; flex-direction: column; justify-content: center; min-height: 54px; padding: 7px 16px; border-radius: 10px; border: 2px dashed #c9bda9; background: #fff; color: var(--ink); text-decoration: none; line-height: 1.2; }
.play-soon small { color: var(--ink-soft); font-size: 0.8rem; font-weight: 600; }
.play-soon span { font-weight: 750; }
.play-soon:hover { border-color: var(--gum); color: var(--gum-dark); }

.hero { padding: 48px 0 40px; }
.eyebrow { display: inline-block; margin-bottom: 14px; padding: 5px 12px; border-radius: 999px; background: var(--bark-soft); color: var(--bark); font-weight: 700; font-size: 0.88rem; }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

section { padding: 48px 0; }
.section-head { max-width: 44em; margin-bottom: 24px; }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }

.apps { display: grid; gap: 18px; }
.app-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: grid; }
.app-body { padding: 24px; }
.app-title { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.app-title img { width: 64px; height: 64px; border-radius: 16px; }
.app-title h3 { margin: 0; }
.app-meta { margin: 2px 0 0; color: var(--ink-soft); font-size: 0.92rem; font-weight: 600; }
.app-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 18px 0 12px; }
.app-note { font-size: 0.88rem; color: var(--ink-soft); margin: 0; }
.app-shot { background: linear-gradient(160deg, var(--gum-soft), #fff 70%); padding: 24px 24px 0; display: flex; justify-content: center; align-items: flex-end; }
.app-shot img { width: min(240px, 70%); border-radius: 22px 22px 0 0; box-shadow: 0 -4px 24px rgba(31, 77, 58, 0.14); }
.app-card.soon { box-shadow: none; border: 2px dashed var(--line); background: transparent; align-content: center; }
.soon-mark { width: 64px; height: 64px; border-radius: 16px; border: 2px dashed #cbbfac; display: grid; place-items: center; font-size: 1.8rem; color: #a99c87; }

.about { display: grid; gap: 28px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { padding-left: 30px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 4px; color: var(--gum); font-weight: 800; }
.ticks strong { color: var(--ink); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }

.page { padding: 40px 0 64px; }
.prose { max-width: 44em; }
.prose h2 { font-size: 1.45rem; margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.updated { color: var(--ink-soft); font-size: 0.95rem; }
.contact-grid { display: grid; gap: 16px; margin: 24px 0; }
.contact-grid .panel h2 { margin-top: 0; font-size: 1.3rem; }
.contact-grid .panel p:last-child { margin-bottom: 0; }

.site-footer { background: var(--gum-dark); color: #d9e6df; padding: 36px 0 28px; font-size: 0.95rem; }
.footer-grid { display: grid; gap: 18px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.footer-links a { color: #d9e6df; font-weight: 600; text-decoration: none; }
.footer-links a:hover { color: var(--sand); text-decoration: underline; }
.copyright { font-weight: 700; color: #fff; margin: 0; }
.small { font-size: 0.88rem; margin: 0; }
.flush { margin: 0; }

.solo { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 48px 0; }
.solo .lead { margin-inline: auto; }
.solo img { width: 72px; height: 72px; margin: 0 auto 18px; }
.solo .hero-actions { justify-content: center; }

@media (min-width: 720px) {
  .nav { gap: 24px; }
  .nav .nav-wide { display: inline; }
  .hero { padding: 88px 0 56px; }
  .app-card { grid-template-columns: 1.4fr 1fr; }
  .app-card.soon { grid-template-columns: 1fr; }
  .app-shot { padding: 32px 32px 0; }
  .about { grid-template-columns: 1.1fr 1fr; align-items: start; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr auto; align-items: center; }
  section { padding: 72px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* Language dropdown: one <details>, no JavaScript (the CSP blocks scripts). */
.header-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lang-switch { position: relative; flex: none; }
.lang-switch summary { list-style: none; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 10px 0 9px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-weight: 700; font-size: 0.92rem; line-height: 1; white-space: nowrap; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary::marker { content: ""; }
.lang-switch summary::after { content: ""; width: 6px; height: 6px; margin-inline-start: 1px; border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft); transform: translateY(-2px) rotate(45deg); transition: transform 0.15s; }
.lang-switch summary:hover { border-color: var(--gum); }
.lang-switch[open] summary { border-color: var(--gum); box-shadow: 0 0 0 3px var(--gum-soft); }
.lang-switch[open] summary::after { transform: translateY(1px) rotate(-135deg); }
/* While open, a see-through layer covers the page. It belongs to <summary>, so tapping outside the panel closes it. */
.lang-switch[open] summary::before { content: ""; position: fixed; inset: 0; z-index: 40; cursor: default; }
.lang-panel { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 41; min-width: 176px; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 34px rgba(20, 30, 25, 0.16), 0 2px 6px rgba(20, 30, 25, 0.06); }
.lang-panel a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.lang-panel a:hover, .lang-panel a:focus-visible { background: var(--gum-soft); color: var(--gum-dark); }
.lang-panel a[aria-current] { color: var(--gum-dark); font-weight: 750; }
.lang-panel a[aria-current]::after { content: "✓"; margin-inline-start: auto; padding-inline-start: 12px; }
.flag { flex: none; width: 21px; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.14); }
@media (max-width: 719px) {
  .lang-switch summary { min-height: 44px; }
}
.brand span { white-space: nowrap; }
@media (max-width: 399px) {
  .nav { gap: 12px; }
  .nav a { font-size: 0.94rem; }
  .header-actions { gap: 8px; }
}

/* Chinese and Hindi pages: the bundled fonts are Latin only, so fall back to system fonts for the script */
html:lang(zh) { --sans: "Source Sans 3", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif; --serif: var(--sans); }
html:lang(hi) { --sans: "Source Sans 3", "Noto Sans Devanagari", "Nirmala UI", "Kohinoor Devanagari", "Mangal", system-ui, sans-serif; --serif: var(--sans); }
html:lang(zh) body, html:lang(hi) body { line-height: 1.75; }
html:lang(zh) :is(h1, h2, h3), html:lang(hi) :is(h1, h2, h3) { letter-spacing: 0; line-height: 1.35; font-weight: 700; }
