/* AHEM Studios — shared styles for ahemstudios.com (home, privacy, terms). */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

:root, [data-theme="dark"] {
  --bg: #0D0A0E; --band: #130E16; --surface: #1A1320; --border: #3A2B36;
  --text: #F2E9E1; --soft: #C2B3B7; --gold: #D4A843;
  --btn: #7B1E3A; --btn-text: #F2E9E1;
  --line: #FBF4EF; --pshadow: rgba(0,0,0,0.55); --glow: rgba(123,30,58,0.55);
  --error: #F08A9C; --ok: #9BD3A6;
}
[data-theme="light"] {
  --bg: #F3EAD9; --band: #EDE1CC; --surface: #FBF5EA; --border: #D9C7A8;
  --text: #1E1612; --soft: #5A4A3E; --gold: #8A6420;
  --btn: #7B1E3A; --btn-text: #FBF5EA;
  --line: #17121A; --pshadow: rgba(23,18,26,0.16); --glow: rgba(123,30,58,0.18);
  --error: #A3253F; --ok: #2F6B3B;
}

body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--text);
  font-family: 'EB Garamond', Georgia, serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--gold); }
a:hover { color: var(--text); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px;
}
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.wrap { max-width: 1160px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.cinzel { font-family: 'Cinzel', serif; }

/* ── Header ─────────────────────────────────────────────── */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-squares { display: flex; gap: 4px; }
.brand-squares span { width: 26px; height: 26px; display: block; }
.brand-squares span:nth-child(1) { background: #EE3A8C; transform: rotate(-6deg); }
.brand-squares span:nth-child(2) { background: #4E2585; transform: rotate(4deg) translateY(2px); }
.brand-squares span:nth-child(3) { background: #9B6BD3; transform: rotate(-3deg) translateY(-1px); }
.brand-squares span:nth-child(4) { background: #C95883; transform: rotate(7deg) translateY(2px); }
.brand-name { font-family: 'Cinzel', serif; font-weight: 700; font-size: 19px; letter-spacing: 0.14em; color: var(--text); }
.site-nav { display: flex; align-items: center; gap: 22px; }
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a, .footer-links a {
  font-family: 'Cinzel', serif; font-weight: 600; font-size: 13px; letter-spacing: 0.16em;
  text-decoration: none; color: var(--soft);
}
.nav-links a:hover, .footer-links a:hover { color: var(--gold); }
.theme-toggle {
  min-height: 44px; padding: 0 16px; border-radius: 4px; border: 1px solid var(--border);
  background: transparent; color: var(--soft); cursor: pointer;
  font-family: 'Cinzel', serif; font-weight: 600; font-size: 12px; letter-spacing: 0.14em;
  display: flex; align-items: center; gap: 8px;
}
.theme-toggle:hover { color: var(--gold); border-color: var(--gold); }

/* ── Ornaments + headings ───────────────────────────────── */
.ornament { display: flex; align-items: center; gap: 12px; }
.ornament::before, .ornament::after { content: ''; width: 60px; height: 1px; background: var(--gold); opacity: 0.6; }
.ornament span { width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }
.ornament.wide::before, .ornament.wide::after { width: 90px; }
.ornament.wide span { width: 9px; height: 9px; }
.section-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.section-title { margin: 0; font-family: 'Cinzel', serif; font-weight: 700; font-size: 34px; letter-spacing: 0.1em; }
.lede { margin: 0; font-size: 19px; line-height: 1.6; color: var(--soft); }
.lede.italic { font-style: italic; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  min-height: 48px; padding: 0 24px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px; border: 1px solid var(--gold); background: var(--btn); color: var(--btn-text);
  font-family: 'Cinzel', serif; font-weight: 700; font-size: 13px; letter-spacing: 0.16em;
  text-decoration: none; cursor: pointer;
}
.btn:hover { color: var(--btn-text); filter: brightness(1.15); }
.btn[disabled] { opacity: 0.6; cursor: wait; filter: none; }

/* ── Hero ───────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; }
.hero-glow {
  position: absolute; left: 50%; top: 46%; width: 1100px; height: 640px; transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, var(--glow) 0%, transparent 62%); pointer-events: none;
}
.hero-inner { position: relative; padding-top: 64px; padding-bottom: 96px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 26px; }
.eyebrow { font-family: 'Cinzel', serif; font-weight: 600; font-size: 13px; letter-spacing: 0.42em; color: var(--gold); }
.hero-title { margin: 0; font-family: 'Cinzel', serif; font-weight: 700; font-size: 46px; letter-spacing: 0.06em; line-height: 1.15; max-width: 800px; }
.hero-sub { margin: 0; font-size: 22px; font-style: italic; line-height: 1.55; color: var(--soft); max-width: 640px; }

/* The logo: four paper squares, each with its own eyes. */
.logo { display: flex; flex-direction: column; align-items: center; gap: 34px; margin-top: 34px; zoom: 0.86; }
.logo-row { display: flex; gap: 18px; }
.sq { position: relative; width: 132px; height: 132px; }
.sq svg { position: absolute; right: 0; top: -36px; overflow: visible; }
.sq .shadow, .sq .paper { position: absolute; inset: 0; }
.sq .shadow { background: var(--pshadow); transform: translate(5px, 8px); }
.sq .paper { display: flex; align-items: center; justify-content: center; }
.sq .paper b { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 100px; line-height: 1; color: #FBF4EF; text-shadow: 4px 4px 0 #7B1E3A; }
.sq .tape {
  position: absolute; top: -11px; left: 4px; width: 44px; height: 22px;
  background: repeating-linear-gradient(-45deg, #17121A 0px 6px, #B98AF0 6px 10px);
  clip-path: polygon(0% 12%, 5% 0%, 95% 0%, 100% 14%, 97% 50%, 100% 86%, 95% 100%, 5% 100%, 0% 88%, 3% 50%);
}
.logo .studios { font-family: 'Short Stack', cursive; font-size: 36px; letter-spacing: 0.24em; margin-right: -0.24em; color: var(--text); text-shadow: 3px 3px 0 #7B1E3A; }
.ew { fill: #FFFFFF; stroke: var(--line); stroke-width: 3; }
.ln { fill: none; stroke: var(--line); stroke-width: 3; stroke-linecap: round; }
.brow { fill: none; stroke: var(--line); stroke-width: 5; stroke-linecap: round; }
.lid { fill: #C95883; stroke: var(--line); stroke-width: 3; stroke-linejoin: round; }

/* ── Works ──────────────────────────────────────────────── */
.works { background: var(--band); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.works-inner { padding-top: 80px; padding-bottom: 88px; }
.works .section-head { margin-bottom: 52px; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; }
.card { border-radius: 6px; padding: 8px; display: flex; flex-direction: column; box-shadow: 0 10px 40px rgba(0,0,0,0.45); }
.card-frame { border-radius: 3px; display: flex; flex-direction: column; flex: 1 1 auto; overflow: hidden; }
.card-art { position: relative; height: 230px; }
.card-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 0 26px 28px; display: flex; flex-direction: column; gap: 14px; flex: 1 1 auto; }
.card-id { position: relative; display: flex; align-items: flex-end; gap: 16px; margin-top: -40px; }
.card-icon { width: 84px; height: 84px; border-radius: 18px; flex: 0 0 auto; }
.card-name { font-family: 'Cinzel', serif; font-weight: 800; font-size: 28px; letter-spacing: 0.1em; }
.card-tag { font-size: 11px; letter-spacing: 0.18em; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.badge { font-size: 11px; letter-spacing: 0.18em; padding: 6px 10px; }
.card p { margin: 0; }
.card ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.card li { display: flex; align-items: center; gap: 10px; }
.card li::before { content: ''; width: 6px; height: 6px; flex: 0 0 auto; }
.card-actions { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; gap: 12px; }
.card-actions a {
  min-height: 48px; padding: 0 22px; display: inline-flex; align-items: center; border-radius: 4px;
  font-family: 'Cinzel', serif; font-weight: 700; font-size: 12px; letter-spacing: 0.14em; text-decoration: none;
}
.card-actions a:hover { filter: brightness(1.15); }
/* A date in place of a button, until a launch (not a link) */
.card-actions .soon {
  min-height: 48px; padding: 0 22px; display: inline-flex; align-items: center; border-radius: 4px;
  font-family: 'Cinzel', serif; font-weight: 700; font-size: 12px; letter-spacing: 0.14em;
}

/* Shadecrest — its own game palette */
.card-shadecrest { background: #120f1a; border: 1px solid #231f38; }
.card-shadecrest .card-frame { border: 1px solid #352e50; }
.card-shadecrest .card-art { background: #090910; }
.card-shadecrest .card-icon { background: #090910; border: 1px solid #352e50; box-shadow: 0 0 24px rgba(160,60,240,0.35); }
.card-shadecrest .card-name { color: #d4af37; }
.card-shadecrest .card-tag { font-family: 'Cinzel', serif; font-weight: 600; color: #7a7298; }
.card-shadecrest .badge { font-family: 'Cinzel', serif; font-weight: 700; border: 1px solid rgba(212,175,55,0.35); color: #d4af37; }
.card-shadecrest .where { font-size: 17px; font-style: italic; color: #9890b8; }
.card-shadecrest p { font-size: 18px; line-height: 1.6; color: #c8c0e2; }
.card-shadecrest ul { font-size: 16px; color: #c8c0e2; }
.card-shadecrest li::before { background: #d4af37; transform: rotate(45deg); }
.card-shadecrest .primary { background: #7a2335; border: 1px solid #9b2d43; color: #f0e8e2; }
.card-shadecrest .secondary { border: 1px solid #352e50; color: #d8d0ee; }
.card-shadecrest a:hover { color: inherit; }

/* Iron Bind — its own app palette */
.card-ironbind { background: #000000; border: 1px solid #2a2a2a; font-family: 'Inter', sans-serif; }
.card-ironbind .card-frame { border: 1px solid rgba(212,175,55,0.28); }
.card-ironbind .card-art { background: #1E1814; }
.card-ironbind .card-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 55%, rgba(0,0,0,0.9) 100%); }
.card-ironbind .card-icon { border: 1px solid rgba(212,175,55,0.45); box-shadow: 0 6px 20px rgba(0,0,0,0.6); }
.card-ironbind .iron { background: linear-gradient(135deg, #ffffff 0%, #9ca3af 35%, #4b5563 60%, #e5e7eb 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card-ironbind .bind { background: linear-gradient(135deg, #fef08a 0%, #d4af37 35%, #996515 60%, #fcd34d 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card-ironbind .card-tag { font-weight: 500; font-size: 12px; letter-spacing: 0.16em; color: #9ca3af; }
.card-ironbind .badge { font-weight: 500; border: 1px solid rgba(212,175,55,0.45); color: #d4af37; }
.card-ironbind .badge-new { background: #d4af37; border-color: #fcd34d; color: #000000; font-weight: 700; text-decoration: none; }
.card-ironbind a.badge-new:hover { background: #fcd34d; color: #000000; }
.card-ironbind .card-art img { object-position: top; }
.card-ironbind .card-new { font-size: 14px; line-height: 1.6; color: #9ca3af; }
.card-ironbind .card-new strong { color: #d4af37; font-weight: 600; }
.card-ironbind .where { font-size: 14px; color: #9ca3af; }
.card-ironbind p { font-size: 16px; line-height: 1.65; color: #d1d5db; }
.card-ironbind ul { font-size: 14px; color: #d1d5db; }
.card-ironbind li::before { border-radius: 50%; background: #d4af37; }
.card-ironbind .primary { background: #d4af37; border: 1px solid #fcd34d; color: #000000; font-weight: 800; }
.card-ironbind .secondary { border: 1px solid #4b5563; color: #e5e7eb; }
.card-ironbind .soon { border: 1px solid rgba(212,175,55,0.45); color: #d4af37; }
.card-ironbind a:hover { color: inherit; }

.more { margin: 52px 0 0; font-size: 19px; font-style: italic; color: var(--soft); text-align: center; }

/* ── Contact form ───────────────────────────────────────── */
.contact { padding-top: 88px; padding-bottom: 96px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.contact .section-title { font-size: 30px; }
.contact .lede { max-width: 540px; }
.raven {
  width: 100%; max-width: 680px; margin-top: 18px; padding: 32px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface); text-align: left;
  display: flex; flex-direction: column; gap: 26px;
}
.raven fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.field-label {
  display: block; margin-bottom: 10px; padding: 0;
  font-family: 'Cinzel', serif; font-weight: 600; font-size: 12px; letter-spacing: 0.16em; color: var(--gold);
}
.field-label .opt { color: var(--soft); letter-spacing: 0.08em; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  min-height: 44px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center;
  border: 1px solid var(--border); color: var(--soft); background: transparent;
  font-family: 'Cinzel', serif; font-weight: 600; font-size: 12px; letter-spacing: 0.12em;
}
.chip input:hover + span { border-color: var(--gold); }
.chip input:checked + span { background: var(--btn); border-color: var(--gold); color: var(--btn-text); }
.chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 3px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.raven input[type="text"], .raven input[type="email"], .raven textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 4px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font-family: 'EB Garamond', Georgia, serif; font-size: 18px;
}
.raven textarea { resize: vertical; line-height: 1.5; }
.raven input::placeholder, .raven textarea::placeholder { color: var(--soft); opacity: 0.75; }
.raven [aria-invalid="true"] { border-color: var(--error); }
.count { display: block; margin-top: 6px; font-size: 14px; color: var(--soft); text-align: right; }
.note { margin: -8px 0 0; font-size: 16px; line-height: 1.5; color: var(--soft); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.raven-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.raven-foot .alt { font-size: 16px; color: var(--soft); }
.form-status { margin: 0; font-size: 17px; }
.form-status:empty { display: none; }
.form-status.error { color: var(--error); }
.raven-sent { text-align: center; align-items: center; }
.raven-sent h3 { margin: 0; font-family: 'Cinzel', serif; font-weight: 700; font-size: 22px; letter-spacing: 0.1em; color: var(--gold); }
.raven-sent p { margin: 0; font-size: 18px; line-height: 1.6; color: var(--soft); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); }
.footer-inner { padding-top: 28px; padding-bottom: 36px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.copyright { font-family: 'Cinzel', serif; font-size: 12px; letter-spacing: 0.14em; color: var(--soft); }
.footer-note { margin-top: 6px; font-family: 'Cinzel', serif; font-size: 10px; letter-spacing: 0.14em; color: var(--soft); opacity: 0.7; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { font-size: 12px; letter-spacing: 0.14em; font-weight: 400; }

/* ── Legal pages ────────────────────────────────────────── */
.legal { max-width: 760px; padding-top: 40px; padding-bottom: 80px; }
.legal-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; margin-bottom: 40px; }
.legal-head h1 { margin: 0; font-family: 'Cinzel', serif; font-weight: 700; font-size: 36px; letter-spacing: 0.08em; }
.legal-head .effective { margin: 0; font-size: 16px; font-style: italic; color: var(--soft); }
.legal .intro { font-size: 19px; line-height: 1.7; color: var(--soft); text-align: center; margin: 0 auto 44px; max-width: 620px; }
.legal section { margin-bottom: 36px; }
.legal h2 {
  margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
  font-family: 'Cinzel', serif; font-weight: 600; font-size: 14px; letter-spacing: 0.2em; color: var(--gold);
}
.legal p, .legal li { font-size: 17px; line-height: 1.75; color: var(--soft); }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 22px; }
.legal strong { color: var(--text); font-weight: 600; }

@media (max-width: 860px) { .cards { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .logo { zoom: 0.48; }
  .nav-links { display: none; }
  .hero-title { font-size: 32px; }
  .section-title, .contact .section-title { font-size: 26px; }
  .raven { padding: 22px 18px; }
  .card-body { padding: 0 18px 22px; }
  .card ul { grid-template-columns: minmax(0, 1fr); }
  .legal-head h1 { font-size: 28px; }
  .site-header { gap: 10px; }
  .brand { gap: 8px; min-width: 0; }
  .brand-squares span { width: 18px; height: 18px; }
  .brand-name { font-size: 15px; letter-spacing: 0.1em; }
  .theme-toggle { padding: 0 12px; }
  .theme-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .card-name { font-size: 22px; letter-spacing: 0.08em; }
  .card-id { gap: 12px; }
  .card-icon { width: 72px; height: 72px; border-radius: 16px; }
}
.sr-only:focus { position: fixed; top: 12px; left: 12px; width: auto; height: auto; clip: auto; padding: 10px 16px; margin: 0; background: var(--surface); color: var(--gold); border: 1px solid var(--gold); z-index: 10; }
