/* fireplaceone.app: one stylesheet, dark only, system fonts, no inline style (the CSP is style-src 'self').
   Colors from the app's icon and its App Store page (AppStore/studio/src/design/tokens.ts): the hearth's dark
   brick, the embers' orange, the flame's amber for the one emphasized phrase of a headline. Logical properties
   throughout, so Arabic (dir="rtl") mirrors on its own. 16 px side gutter on phones, 24 px from 600 px. */

:root {
  --bg: #0d0503;
  --bg-2: #160805;
  --card: #1d0c06;
  --line: rgba(255, 228, 205, 0.1);
  --ink: #f7ede4;
  --muted: rgba(255, 240, 225, 0.72);
  --flame: #ffb45a;
  --ember: #a3631f;
  --ember-deep: #3e1300;
  --radius: 18px;
  --gutter: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
@media (min-width: 600px) { :root { --gutter: 24px; } }

:lang(ja) { --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif; --font-display: var(--font); }
:lang(ko) { --font: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif; --font-display: var(--font); }
:lang(zh-Hans) { --font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif; --font-display: var(--font); }
:lang(ar) { --font: "SF Arabic", "Geeza Pro", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif; --font-display: var(--font); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-inline-size: 100%; block-size: auto; }
a { color: var(--flame); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--flame); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 700; text-wrap: balance; }
:lang(ja) h1, :lang(ja) h2, :lang(ko) h1, :lang(ko) h2, :lang(zh-Hans) h1, :lang(zh-Hans) h2, :lang(ar) h1, :lang(ar) h2 { letter-spacing: 0; line-height: 1.25; }
h1 em, h2 em { font-style: normal; color: var(--flame); }
p { margin: 0 0 1em; }

.wrap { inline-size: min(100% - 2 * var(--gutter), 1200px); margin-inline: auto; }
.wrap.narrow { inline-size: min(100% - 2 * var(--gutter), 760px); }
.skip { position: absolute; inset-inline-start: -9999px; }
.skip:focus { inset-inline-start: var(--gutter); inset-block-start: 8px; z-index: 20; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; }

/* ---------- header ---------- */
.site-header { position: absolute; inset-block-start: 0; inset-inline: 0; z-index: 10; }
body:not([data-page="home"]) .site-header { position: relative; border-block-end: 1px solid var(--line); background: var(--bg-2); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px var(--gutter); max-inline-size: 1248px; margin-inline: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; font-size: 17px; }
.brand img { border-radius: 8px; }
.bar-end { display: flex; align-items: center; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-block-size: 44px; padding: 10px 20px; border-radius: 999px; background: var(--flame); color: #1a0b05; font-weight: 650; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #ffc477; text-decoration: none; }
.btn-small { min-block-size: 36px; padding: 6px 16px; font-size: 15px; }

.lang-menu { position: relative; }
.lang-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-block-size: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(13, 5, 3, 0.5); color: var(--ink); cursor: pointer; font-size: 14px; font-weight: 600; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-list { position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + 8px); margin: 0; padding: 8px; list-style: none; min-inline-size: 200px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55); }
.lang-list a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.lang-list a:hover, .lang-list a[aria-current] { background: rgba(255, 180, 90, 0.12); color: var(--flame); }
@media (max-width: 380px) { .lang-code { display: none; } .brand span { font-size: 15px; } }

/* ---------- hero ---------- */
.hero { position: relative; min-block-size: min(100svh, 980px); display: flex; align-items: flex-end; padding-block: 120px 56px; isolation: isolate; overflow: hidden; }
.hero-film { position: absolute; inset: 0; z-index: -1; background: #000; }
.hero-video { inline-size: 100%; block-size: 100%; object-fit: cover; object-position: 50% 62%; }
.hero-film::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(13, 5, 3, 0.55) 0%, rgba(13, 5, 3, 0) 26%, rgba(13, 5, 3, 0) 46%, rgba(13, 5, 3, 0.78) 78%, var(--bg) 100%); }
.hero h1 { font-size: clamp(40px, 7.2vw, 88px); max-inline-size: 13em; margin-block-end: 0.35em; }
.hero-lead { font-size: clamp(18px, 2vw, 22px); color: var(--ink); max-inline-size: 34em; text-wrap: pretty; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; margin-block-start: 22px; }
.hero-note { margin: 0; color: var(--muted); font-size: 15px; }
.film-toggle { position: absolute; inset-block-end: 20px; inset-inline-end: var(--gutter); z-index: 2; inline-size: 44px; block-size: 44px; border-radius: 50%; border: 1px solid var(--line); background: rgba(13, 5, 3, 0.55); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.film-toggle .i-play, .film-toggle.is-paused .i-pause { display: none; }
.film-toggle.is-paused .i-play { display: block; }

.app-store-badge { display: inline-block; line-height: 0; }
.app-store-badge img { block-size: 40px; inline-size: auto; }
.app-store-badge.is-lg img { block-size: 54px; }

/* ---------- sections ---------- */
section { scroll-margin-block-start: 24px; }
.feature, .screens, .free, .faq, .cta { padding-block: clamp(64px, 9vw, 120px); }
.feature + .feature { padding-block-start: 0; }
.feature h2, .screens h2, .free h2, .faq h2, .cta h2 { font-size: clamp(32px, 4.6vw, 54px); }
.feature-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 960px) {
  .feature-grid { grid-template-columns: 5fr 7fr; gap: 64px; }
  .feature.is-flipped .feature-copy { order: 2; }
}
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; color: var(--muted); font-size: 18px; }
.ticks li { position: relative; padding-inline-start: 26px; text-wrap: pretty; }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-start: 0.55em; inline-size: 10px; block-size: 10px; border-radius: 50%; background: radial-gradient(circle, var(--flame) 0 35%, var(--ember) 70%, transparent 72%); }
.ticks.is-wide { max-inline-size: 760px; margin-block-end: 40px; }

.shot { margin: 0; }
.shot img { inline-size: 100%; border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--line); background: #000; }
.shot figcaption { margin-block-start: 10px; color: var(--muted); font-size: 14px; text-align: center; }
.shot.is-mac img { border-radius: 12px; background: transparent; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); }

.screens { background: linear-gradient(to bottom, var(--bg), var(--bg-2) 30%, var(--bg-2) 70%, var(--bg)); }
.screens-grid { display: grid; gap: 28px; }
@media (min-width: 720px) {
  .screens-grid { grid-template-columns: 2.4fr 1fr; align-items: end; }
  .screens-grid .is-tv { grid-column: 1; grid-row: 1; }
  .screens-grid .is-ipad { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .screens-grid .is-mac { grid-column: 1; grid-row: 2; }
}
@media (max-width: 719px) { .screens-grid .is-ipad { inline-size: min(100%, 320px); margin-inline: auto; } }

.free { text-align: center; }
.free p { color: var(--muted); font-size: 18px; text-wrap: pretty; }
.chips { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chip { padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255, 180, 90, 0.35); color: var(--flame); font-size: 15px; font-weight: 600; background: rgba(255, 180, 90, 0.06); }

.faq-item { border-block-end: 1px solid var(--line); }
.faq-item summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 650; font-size: 18px; display: flex; justify-content: space-between; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--flame); font-size: 24px; line-height: 1; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-a { color: var(--muted); padding-block-end: 12px; }

.cta { text-align: center; background: radial-gradient(ellipse at 50% 110%, rgba(163, 99, 31, 0.45), transparent 60%); }
.cta p { color: var(--muted); }

/* ---------- document pages ---------- */
.wrap-doc { inline-size: min(100% - 2 * var(--gutter), 760px); margin-inline: auto; padding-block: 48px 80px; }
.doc-head h1 { font-size: clamp(34px, 5vw, 52px); }
.updated { color: var(--muted); font-size: 15px; }
.notice { font-size: 15px; color: var(--muted); border-inline-start: 3px solid var(--ember); padding-inline-start: 14px; }
.prose { color: rgba(255, 240, 225, 0.86); }
.prose .lead { font-size: 20px; color: var(--ink); }
.prose h2 { font-size: 24px; margin-block-start: 1.8em; }
.prose ul { padding-inline-start: 1.2em; }
.prose li { margin-block-end: 0.5em; }
.prose dl { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 6px 18px; margin: 0 0 1em; }
.prose dt { color: var(--muted); }
.prose dd { margin: 0; unicode-bidi: plaintext; }
@media (max-width: 520px) { .prose dl { grid-template-columns: 1fr; } .prose dd { margin-block-end: 8px; } }

/* ---------- 404 ---------- */
.nf { padding-block: 120px; text-align: center; }
.nf h1 { font-size: clamp(36px, 6vw, 64px); }
.nf p { color: var(--muted); }
.nf-langs { list-style: none; padding: 0; margin-block-start: 40px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-size: 15px; }

/* ---------- footer ---------- */
.site-footer { border-block-start: 1px solid var(--line); background: var(--bg-2); padding-block: 40px 48px; font-size: 15px; }
.foot-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-block-end: 24px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-block-end: 20px; }
.foot-links a, .foot-langs a { color: var(--ink); text-decoration: none; }
.foot-links a:hover, .foot-langs a:hover { color: var(--flame); }
.foot-langs { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); }
.foot-langs a[aria-current] { color: var(--flame); }
.foot-small { color: var(--muted); font-size: 13px; margin: 0 0 6px; max-inline-size: 70em; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .hero-film, .film-toggle { display: none; } body { background: #fff; color: #000; } }
