/* Abyss Vanish — portal styles. System fonts only: no web fonts, no CDNs, no trackers. */

:root {
  --bg: #0b1115;
  --bg-2: #0f181d;
  --surface: #131e24;
  --surface-2: #17242b;
  --line: #233239;
  --line-2: #2f434b;
  --fg: #edf4ef;
  --text: #cfdcd7;
  --muted: #a3b7b1;
  --faint: #7f958e;
  --teal: #8fc7b8;
  --gold: #f2b84b;
  --gold-2: #e5a233;
  --gold-ink: #1d1406;
  --radius: 16px;
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei",
          Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background:
    radial-gradient(900px 520px at 78% -8%, rgba(143, 199, 184, 0.10), transparent 62%),
    radial-gradient(700px 420px at 8% 4%, rgba(242, 184, 75, 0.06), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* One language at a time: Traditional Chinese unless data-lang says English (also the no-JS default). */
:root[data-lang="en"] .zh { display: none; }
:root:not([data-lang="en"]) .en { display: none; }

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

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 28px; } }
.narrow > * { max-width: 760px; }   /* a reading measure that keeps the page's left edge */

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 30;
  background: var(--gold); color: var(--gold-ink); padding: 8px 14px; border-radius: 10px; font-weight: 600;
}
.skip:focus { top: 12px; text-decoration: none; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 17, 21, 0.78);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 650; letter-spacing: 0.01em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.mark {
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, var(--gold) 0%, var(--teal) 55%, rgba(11, 17, 21, 0) 100%);
  box-shadow: 0 0 18px rgba(143, 199, 184, 0.45);
}
nav { display: flex; align-items: center; gap: 4px; }
nav a { color: var(--muted); padding: 6px 10px; border-radius: 8px; font-size: 0.95rem; }
nav a:hover { color: var(--fg); text-decoration: none; background: rgba(255, 255, 255, 0.04); }
.lang {
  margin-left: 6px; font: inherit; font-size: 0.85rem; font-weight: 600; color: var(--fg);
  background: transparent; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 12px; cursor: pointer;
}
.lang:hover { border-color: var(--teal); }
nav a, .lang, .brand { white-space: nowrap; }
@media (max-width: 420px) {
  .top-row { gap: 8px; }
  .brand { gap: 8px; }
  .word { font-size: 0.95rem; }
  nav { gap: 2px; }
  nav a { padding: 6px 5px; font-size: 0.88rem; }
  .lang { margin-left: 4px; padding: 3px 9px; }
}

/* Type */
.eyebrow { margin: 0 0 10px; color: var(--teal); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; }
h1, h2, h3 { color: var(--fg); margin: 0; }
h1 { font-size: clamp(2.3rem, 6.2vw, 4.4rem); line-height: 1.12; font-weight: 600; letter-spacing: -0.01em; }
:root[data-lang="en"] h1 { letter-spacing: -0.03em; line-height: 1.04; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.25; font-weight: 600; margin-bottom: 28px; }
h3 { font-size: 1.3rem; line-height: 1.3; font-weight: 600; }
h3 .sub { display: inline-block; margin-left: 8px; color: var(--muted); font-size: 0.95rem; font-weight: 500; }
p { margin: 0 0 16px; }
.muted { color: var(--muted); }
.kicker { margin: 0 0 6px; color: var(--faint); font-size: 0.86rem; letter-spacing: 0.02em; }
.note { color: var(--muted); font-size: 0.95rem; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; border-radius: 12px;
  font-weight: 600; font-size: 0.96rem; color: var(--fg); border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02);
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.btn:hover { text-decoration: none; border-color: var(--teal); background: rgba(143, 199, 184, 0.08); }
.btn.primary { background: linear-gradient(180deg, var(--gold), var(--gold-2)); border-color: transparent; color: var(--gold-ink); }
.btn.primary:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn.quiet { border-color: transparent; color: var(--muted); padding-left: 10px; padding-right: 10px; }
.btn.quiet:hover { color: var(--fg); background: rgba(255, 255, 255, 0.04); }

/* Hero: the town fades out of the dark, as the name says */
.hero { padding: 56px 0 40px; overflow: hidden; }
.hero-grid { display: grid; gap: 36px; align-items: center; }
.lede { margin-top: 22px; font-size: clamp(1.05rem, 2.1vw, 1.22rem); color: var(--text); max-width: 34em; }
.hero-art { margin: 0; position: relative; }
.hero-art img {
  width: 100%; border-radius: var(--radius);
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
}
@media (min-width: 900px) {
  .hero { padding: 88px 0 72px; }
  .hero-grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 48px; }
  .hero-art { margin-right: -12%; }
  .hero-art img {
    border-radius: 22px 0 0 22px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 78%, transparent 100%),
                        linear-gradient(180deg, transparent 0%, #000 14%, #000 82%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 78%, transparent 100%),
                linear-gradient(180deg, transparent 0%, #000 14%, #000 82%, transparent 100%);
    mask-composite: intersect;
  }
}

/* Sections */
section { padding: 56px 0; }
.work { border-top: 1px solid var(--line); }
@media (min-width: 900px) { section { padding: 80px 0; } }

/* Featured work */
.feature {
  display: grid; gap: 0; overflow: hidden;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
}
.feature-art img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.feature-body { padding: 22px 20px 24px; }
.feature-body p { max-width: 40em; }
@media (min-width: 900px) {
  .feature { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .feature-art img { height: 100%; aspect-ratio: auto; }
  .feature-body { padding: 36px 34px; align-self: center; }
}

/* Burn the Corn: the game's own warm wood and ember tones */
.feature.btc {
  margin-top: 18px; display: block;
  background:
    radial-gradient(520px 260px at 92% 0%, rgba(242, 140, 50, 0.16), transparent 70%),
    linear-gradient(180deg, #24180f, #15100c);
  border-color: #3a2a1c;
}
.btc-body { padding: 22px 20px 6px; }
.app-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.app-icon { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); flex: none; }
.btc .kicker { color: #b89e86; }
.btc-cols { display: grid; gap: 8px 36px; }
.lead-in { color: var(--fg); font-weight: 600; font-size: 1.05rem; margin-bottom: 8px; }
.modes { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 12px; }
.modes li { color: #d9c9b8; padding-left: 18px; position: relative; font-size: 0.96rem; line-height: 1.6; }
.modes li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px rgba(242, 184, 75, 0.6); }
.modes strong { display: block; color: var(--fg); font-weight: 600; }
.support { margin: 14px 0 0; color: #9c8774; font-size: 0.88rem; }
.support a { color: #e6b672; font-weight: 500; }

.phones {
  display: flex; gap: 12px; padding: 18px 20px 22px;
  overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.phones figure { margin: 0; flex: 0 0 56%; scroll-snap-align: start; }
.phones img { width: 100%; border-radius: 16px; border: 1px solid rgba(255, 233, 200, 0.12); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45); background: #1d140d; }
.phones figcaption { margin-top: 8px; text-align: center; color: #b89e86; font-size: 0.86rem; }
@media (min-width: 640px) { .phones figure { flex-basis: 34%; } }
@media (min-width: 900px) {
  .btc-body { padding: 36px 34px 10px; }
  .btc-cols { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .phones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; padding: 22px 34px 34px; overflow: visible; }
}

/* The other two */
.pair { display: grid; gap: 18px; margin-top: 18px; }
@media (min-width: 760px) { .pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card {
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px 22px; overflow: hidden;
}
.card .actions { margin-top: auto; padding-top: 6px; }
.card h3 { margin-bottom: 12px; }
.card-art { margin: 0 -20px 20px; height: 150px; position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }

.art-life {
  background:
    radial-gradient(240px 140px at 22% 120%, rgba(143, 199, 184, 0.45), transparent 70%),
    radial-gradient(200px 120px at 82% -10%, rgba(242, 184, 75, 0.35), transparent 70%),
    linear-gradient(160deg, #18302b, #0f1d22);
  display: grid; place-items: center;
}
.art-life span { font-size: 3.6rem; font-weight: 700; letter-spacing: 0.12em; color: rgba(237, 244, 239, 0.88); text-shadow: 0 6px 30px rgba(0, 0, 0, 0.35); }

.art-pills { background: linear-gradient(160deg, #1d1a26, #10161b); }
.pill { position: absolute; display: block; width: 150px; height: 56px; border-radius: 999px; top: 50%; left: 50%; }
.pill.blur {
  transform: translate(-82%, -66%) rotate(-18deg);
  background: linear-gradient(90deg, #7fb0ff, #b7c9ff);
  filter: blur(7px); opacity: 0.75;
}
.pill.red {
  transform: translate(-18%, -30%) rotate(-18deg);
  background: linear-gradient(90deg, #e2493b 50%, #f4efe8 50%);
  box-shadow: 0 10px 30px rgba(226, 73, 59, 0.35);
}

/* Principles */
.values { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(19, 30, 36, 0.45); padding: 40px 0; }
.values-grid { display: grid; gap: 22px; }
.values h3 { font-size: 1.05rem; margin-bottom: 6px; }
.values h3::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-right: 10px; vertical-align: 0.15em; }
.values p { margin: 0; color: var(--muted); font-size: 0.96rem; }
@media (min-width: 760px) { .values-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; } }

.about strong { color: var(--fg); font-weight: 600; }
.contact { border-top: 1px solid var(--line); }
.contact a { font-weight: 600; word-break: break-all; }

footer { border-top: 1px solid var(--line); padding: 26px 0 44px; color: var(--faint); font-size: 0.9rem; }
.foot-row { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .btn.primary:hover { transition: none; transform: none; }
}
