/* ArchonCam website — single stylesheet, no external fonts or scripts.
   Dark by default (matching the app icon), light theme via prefers-color-scheme. */

:root {
  color-scheme: dark light;

  --bg: #0b0e1a;
  --bg-alt: #10152a;
  --surface: #161d36;
  --surface-2: #1c2544;
  --border: #2a3555;
  --text: #eef1fa;
  --text-muted: #a9b2cd;
  --accent: #74b0ff;
  --accent-strong: #2a63d8;
  --accent-strong-2: #6a35d9;
  --on-accent: #ffffff;
  --focus: #ffd166;

  /* Minimum activation area for standalone links (WCAG 2.1 AA target size). */
  --tap: 44px;

  --wrap: 68rem;
  --wrap-narrow: 44rem;
  --radius: 14px;
  --radius-lg: 22px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo",
    "Noto Sans KR", "Malgun Gothic", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --bg-alt: #f3f5fb;
    --surface: #ffffff;
    --surface-2: #eef1f9;
    --border: #d5dcec;
    --text: #10131f;
    --text-muted: #4d556b;
    --accent: #1f56c4;
    --accent-strong: #2a63d8;
    --accent-strong-2: #6a35d9;
    --on-accent: #ffffff;
    --focus: #8a4b00;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--text);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}

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

.wrap--narrow {
  width: min(100% - 2.5rem, var(--wrap-narrow));
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg); /* fallback where color-mix is unsupported */
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 0.7rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
}

.brand__mark {
  border-radius: 9px;
  width: 36px;
  height: 36px;
}

.site-nav {
  margin-inline-start: auto;
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}

.site-nav__list a {
  color: var(--text-muted);
  text-decoration: none;
  padding-inline: 0.5rem;
}

.site-nav__list a:hover {
  color: var(--text);
  text-decoration: underline;
}

.lang-switch {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding-inline: 1rem;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  background: var(--surface-2);
}

.lang-switch:hover {
  border-color: var(--accent);
}

@media (max-width: 46rem) {
  .site-nav {
    order: 3;
    width: 100%;
    margin-inline-start: 0;
  }
  .lang-switch {
    margin-inline-start: auto;
  }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn--primary {
  background-image: linear-gradient(120deg, var(--accent-strong), var(--accent-strong-2));
  color: var(--on-accent);
}

.btn--primary:hover {
  filter: brightness(1.12);
  color: var(--on-accent);
}

.btn--ghost {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* ---------- hero ---------- */

.hero {
  padding-block: clamp(3rem, 9vw, 6rem) clamp(2rem, 6vw, 4rem);
  background:
    radial-gradient(60rem 28rem at 50% -8rem, color-mix(in srgb, var(--accent-strong) 26%, transparent), transparent 70%),
    var(--bg);
  text-align: center;
}

.hero__icon {
  width: clamp(84px, 14vw, 128px);
  height: auto;
  border-radius: 24px;
}

.hero__eyebrow {
  margin: 1.25rem 0 0.5rem;
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 600;
}

.hero__title {
  font-size: clamp(2rem, 6vw, 3.4rem);
  margin-bottom: 0.5em;
  /*
   * Roughly the 12ch (Korean) / 15ch (Latin) measure the copy was written for,
   * expressed in em so it scales with the heading and stays wide enough for the
   * intended two-line break to hold in both languages — ch differs too much
   * between the Hangul and Latin faces to be safe here.
   */
  max-width: min(100%, 10em);
  margin-inline: auto;
  text-wrap: balance;
}

.hero__lead {
  max-width: 33rem;
  margin-inline: auto;
  color: var(--text-muted);
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  line-height: 1.65;
  text-wrap: pretty;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
}

/* The hero centres its badges; the pricing claims sit in a left-aligned section. */
.badges--start {
  justify-content: flex-start;
  margin-top: 0.5rem;
}

.badge {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero__cta {
  margin-top: 1.5rem;
}

/* ---------- sections ---------- */

.section {
  padding-block: clamp(2.75rem, 7vw, 4.5rem);
  border-top: 1px solid var(--border);
}

.section--alt {
  background: var(--bg-alt);
}

.section--stores {
  text-align: center;
}

.section--contact {
  text-align: center;
}

.section__title {
  font-size: clamp(1.5rem, 3.6vw, 2.1rem);
}

.section__lead {
  color: var(--text-muted);
  max-width: 46rem;
}

.section--stores .section__lead,
.section--contact .section__lead {
  margin-inline: auto;
}

.section__note {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 1.5rem;
}

.section__action {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section--contact .section__action {
  justify-content: center;
}

/* ---------- scene ---------- */

.scene {
  margin: 2rem 0 0;
}

.scene img {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: block;
  width: 100%;
  height: auto;
}

.scene figcaption {
  margin-top: 0.65rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  text-align: center;
}

/* ---------- store buttons ---------- */

.store-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 1.75rem;
}

.store-btn,
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  min-height: 44px;
}

.download-btn {
  border-color: var(--accent);
}

.download-btn:hover,
.download-btn:focus-visible {
  background: var(--surface-2);
}

.downloads {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.downloads__title {
  margin: 0;
  font-size: 1.25rem;
}

.store-btn--soon {
  width: 10rem;
  min-height: 3.25rem;
  color: var(--text-muted);
  border-style: dashed;
  cursor: default;
}

.store-btn__badge {
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

/* ---------- cards ---------- */

.cards {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
}

.card__title {
  font-size: 1.1rem;
  margin-bottom: 0.4em;
}

.card__body {
  color: var(--text-muted);
  margin: 0;
}

/* ---------- other apps ---------- */

.apps__list-title {
  font-size: 1.15rem;
  margin-top: 2.5rem;
}

.app-cards {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.app-card__icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  flex: none;
}

.app-card__text {
  flex: 1 1 14rem;
}

.app-card__category {
  margin: 0 0 0.2rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.app-card__title {
  font-size: 1.15rem;
  margin-bottom: 0.4em;
}

.app-card__body {
  color: var(--text-muted);
}

.app-card__status {
  display: inline-block;
  margin: 0 0 0.9rem;
  padding: 0.25rem 0.75rem;
  border: 1px dashed var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.app-card__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.app-card__link {
  font-weight: 600;
}

/* ---------- steps ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.step__label {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.step__title {
  font-size: 1.1rem;
}

.step__shot {
  margin-top: 1.1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: block;
  width: 100%;
  height: auto;
}

.step__body {
  color: var(--text-muted);
  margin: 0;
}

/* ---------- donation ---------- */

.donate {
  margin-top: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 1.6rem;
  max-width: 46rem;
}

.donate__title {
  font-size: 1.15rem;
}

.donate__body {
  color: var(--text-muted);
}

.donate__pending {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.donate__action {
  margin: 0;
}

/* ---------- hotspot guide ---------- */

.hotspot {
  margin-top: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 1.6rem;
  max-width: 46rem;
}

.hotspot__title {
  font-size: 1.15rem;
  margin: 0;
}

.hotspot__lead {
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.hotspot__list {
  margin: 1rem 0 0;
  padding-left: 1.4rem;
  display: grid;
  gap: 0.45rem;
}

.hotspot__tip {
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hotspot__tip strong {
  color: var(--text);
}

/* ---------- screenshots ---------- */

.shots {
  margin-top: 2rem;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.shot {
  margin: 0;
}

.shot img {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: block;
  width: 100%;
}

.shot__frame {
  aspect-ratio: 9 / 19.5;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  display: grid;
  place-items: center;
}

.shot__badge {
  font-size: 0.85rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  background: var(--surface-2);
}

.shot figcaption {
  margin-top: 0.65rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  text-align: center;
}

/* ---------- faq ---------- */

.faq {
  margin-top: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}

.faq__item + .faq__item {
  border-top: 1px solid var(--border);
}

.faq__q {
  cursor: pointer;
  padding: 1.1rem 1.35rem;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.faq__q::-webkit-details-marker {
  display: none;
}

.faq__q::after {
  content: "+";
  color: var(--accent);
  font-size: 1.3rem;
  line-height: 1;
  flex: none;
}

.faq__item[open] .faq__q::after {
  content: "\2212";
}

.faq__q:hover {
  background: var(--surface-2);
}

.faq__a {
  padding: 0 1.35rem 1.25rem;
  color: var(--text-muted);
}

.faq__a p {
  margin: 0;
}

/* ---------- long-form pages ---------- */

.section--page {
  border-top: none;
}

.page__title {
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
}

.page__meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.page__lead {
  color: var(--text-muted);
}

.prose h2 {
  font-size: 1.25rem;
  margin-top: 2.25rem;
}

.prose ul {
  padding-inline-start: 1.2rem;
  color: var(--text-muted);
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose strong {
  color: var(--text);
}

.prose code {
  background: var(--surface-2);
  border-radius: 6px;
  padding: 0.1em 0.4em;
  font-size: 0.92em;
}

.page__back {
  margin-top: 2.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.notfound__block + .notfound__block {
  margin-top: 2.5rem;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding-block: 2.5rem 1.75rem;
  font-size: 0.93rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  justify-content: space-between;
}

.site-footer__tagline {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.site-footer__meta {
  color: var(--text-muted);
  margin: 0.15rem 0;
}

.site-footer__nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.site-footer__nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding-inline: 0.25rem;
}

.site-footer__nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

.site-footer__legal {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.site-footer__legal p {
  margin: 0.2rem 0;
}

/* ---------- target size ---------- */

/*
 * Standalone links get at least a 44x44 CSS px activation area. Short labels
 * such as "홈", "지원" or "기능" are only a couple of characters wide, so the
 * box — not the text — has to carry the minimum, in both directions. Declared
 * last so it wins over the per-component rules above, and using min-* only, so
 * longer labels still size to their content and nothing overflows at 320px.
 * Inline links inside prose are deliberately excluded (WCAG inline exception);
 * `.prose-link` opts in the ones that stand alone in their own paragraph.
 */
.brand,
.site-nav__list a,
.lang-switch,
.site-footer__nav a,
.site-footer__meta a,
.page__back a,
.prose-link,
.app-card__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  min-width: var(--tap);
}

@media print {
  .site-header,
  .site-footer__nav,
  .skip-link {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
}
