/* Public site styles. Dark by default, with a light option (html[data-theme="light"]). */
:root {
  color-scheme: dark;
  --bg: #070B16;
  --panel: #0E1426;
  --panel-2: #131B34;
  --line: #222C4D;
  --ink: #EEF1FA;
  --text: #C3CADF;
  --muted: #98A2BF;
  --accent: #4A5BF5;
  --accent-ink: #FFFFFF;
  --link: #A5AFFF;
  --tld: #FF9A5B;
  --tile: #F6F7FB;
  --tile-line: #FFFFFF;
  --glow: rgba(74, 91, 245, 0.38);
  --gridline: rgba(255, 255, 255, 0.045);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Instrument Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #F2F4F7;
  --panel: #FFFFFF;
  --panel-2: #F7F8FB;
  --line: #D5DAE3;
  --ink: #0E1726;
  --text: #2B3548;
  --muted: #4A5568;
  --accent: #1F3FD1;
  --link: #1F3FD1;
  --tld: #C2410C;
  --tile: #FFFFFF;
  --tile-line: #E6EAF0;
  --glow: rgba(31, 63, 209, 0.14);
  --gridline: rgba(14, 23, 38, 0.05);
  --shadow: 0 8px 24px rgba(14, 23, 38, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5; }
a { color: var(--link); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--link); outline-offset: 2px;
}

.wrap {
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px), 4vw);
  padding-right: max(16px, env(safe-area-inset-right, 0px), 4vw);
}
@media (min-width: 1300px) { .wrap { padding-left: 48px; padding-right: 48px; } }
.label { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tld { color: var(--tld); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 20px; padding-top: 8px; padding-bottom: 8px; }
.logo { font-family: var(--mono); font-size: 14px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.head-right { display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; }
.nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 600; color: var(--text); text-decoration: none; }
.nav a:hover { color: var(--ink); }
.theme-btn { min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.theme-btn:hover { color: var(--ink); border-color: var(--muted); }

/* Hero */
.hero {
  border-bottom: 1px solid var(--line);
  background-image:
    radial-gradient(60% 90% at 50% 0%, var(--glow), transparent 72%),
    linear-gradient(var(--gridline) 1px, transparent 1px),
    linear-gradient(90deg, var(--gridline) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
}
.hero .wrap { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; padding-top: clamp(44px, 8vw, 96px); padding-bottom: clamp(40px, 7vw, 80px); }
h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(36px, 6vw, 64px); line-height: 1.04; letter-spacing: -0.02em; text-wrap: balance; max-width: 16ch; }
.lead { margin: 0; max-width: 56ch; font-size: 18px; line-height: 1.6; color: var(--text); }
.search {
  width: 100%; max-width: 640px; display: flex; gap: 8px; padding: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.search input {
  flex: 1 1 auto; min-width: 0; min-height: 46px; padding: 0 14px; border: 0; background: transparent;
  color: var(--ink); font: inherit; font-size: 16px;
}
.search input::placeholder { color: var(--muted); }
.search input:focus-visible { outline: none; }
.search:focus-within { border-color: var(--link); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 8px; font-family: var(--body); font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; border: 1.5px solid transparent; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-outline { border-color: var(--link); color: var(--link); background: transparent; }
.btn-link { color: var(--ink); background: transparent; padding: 0 6px; text-decoration: underline; text-underline-offset: 3px; }
.btn:hover { filter: brightness(1.12); }
html[data-theme="light"] .btn:hover { filter: brightness(0.93); }

/* Toolbar */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding-top: 28px; padding-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip {
  min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.fchip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.sort { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: 14px; color: var(--muted); }
.sort select { min-height: 40px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-size: 14px; }
.count { padding-bottom: 20px; font-size: 14px; color: var(--muted); }

/* Domain tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 20px; padding-bottom: clamp(48px, 7vw, 88px); }
.tile-btn {
  display: flex; flex-direction: column; min-width: 0; padding: 0; text-align: left; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; color: inherit; font: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.tile-btn:hover { transform: translateY(-3px); border-color: var(--muted); }
.tile-art { background: var(--tile); border-bottom: 1px solid var(--tile-line); min-height: 170px; display: flex; align-items: center; justify-content: center; padding: 24px; }
.tile-info { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile-name { font-family: var(--mono); font-weight: 600; font-size: 17px; overflow-wrap: anywhere; }
.tile-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; font-size: 14px; color: var(--muted); }
.tile-price { font-family: var(--mono); font-weight: 600; color: var(--ink); }
.sold-tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; background: var(--ink); color: var(--bg); border-radius: 4px; padding: 2px 6px; }
.empty { grid-column: 1 / -1; padding: 40px 0; text-align: center; color: var(--muted); }

/* Logo lockup */
.logo-lockup { display: flex; align-items: center; gap: 12px; max-width: 100%; min-width: 0; }
.logo-mark { flex: none; width: 52px; height: 52px; }
.wm { display: flex; flex-direction: column; min-width: 0; line-height: 1.05; }
.wm-text { display: flex; flex-direction: column; font-family: var(--wm-font); font-weight: 700; font-size: 28px; letter-spacing: -0.01em; color: var(--wm-color); }
.wm-line { display: block; }
.wm-ext { margin-top: 3px; font-family: var(--mono); font-size: 12px; color: #6B7488; }
.logo-lockup.big .logo-mark { width: 64px; height: 64px; }
.logo-lockup.big .wm-text { font-size: 34px; }

/* Detail dialog */
dialog {
  width: min(680px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0; border: 1px solid var(--line);
  border-radius: 14px; background: var(--panel); color: var(--ink); overflow: auto; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
dialog::backdrop { background: rgba(3, 6, 14, 0.7); }
.dlg-top { position: relative; background: var(--tile); border-bottom: 1px solid var(--tile-line); padding: 36px 24px; display: flex; justify-content: center; }
.dlg-close {
  position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(14, 23, 38, 0.08); color: #0E1726; font-size: 22px; line-height: 1; cursor: pointer;
}
.dlg-body { padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.addr { display: flex; align-items: center; gap: 12px; min-width: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.addr .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.addr h2 { margin: 0; min-width: 0; overflow-wrap: anywhere; font-family: var(--mono); font-weight: 600; font-size: clamp(18px, 5vw, 24px); }
.dlg-tag { margin: 0; font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.25; text-wrap: balance; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text); border: 1px solid var(--line); border-radius: 4px; padding: 4px 8px; }
.points { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.points li { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; line-height: 1.55; color: var(--text); }
.points li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 9px; background: var(--link); }
.bestfor { border-top: 1px solid var(--line); padding-top: 16px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--text); }
.dlg-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.price { flex: 1 1 120px; display: flex; flex-direction: column; gap: 2px; }
.price strong { font-family: var(--mono); font-size: 22px; font-weight: 600; }

/* Sections */
section { scroll-margin-top: 16px; }
h2.sec { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; letter-spacing: -0.01em; }
.how { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.how .wrap { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(40px, 6vw, 72px); display: flex; flex-direction: column; gap: 32px; }
.steps { display: flex; flex-wrap: wrap; gap: 32px; }
.step { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.step .label { color: var(--tld); font-weight: 600; font-size: 13px; }
.step h3 { margin: 0; font-family: var(--display); font-size: 20px; }
.step p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text); }

#contact .wrap { display: flex; flex-wrap: wrap; gap: 40px; padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(48px, 7vw, 88px); }
.contact-copy { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.contact-copy p { margin: 0; max-width: 46ch; color: var(--text); }
.contact-cards { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.contact-main { background: var(--accent); color: #fff; border-radius: 12px; padding: 32px 24px; display: flex; flex-direction: column; gap: 8px; }
.contact-main .label { color: #DCE3FF; }
.contact-main a { color: #fff; font-family: var(--mono); font-weight: 600; font-size: clamp(19px, 5vw, 30px); overflow-wrap: anywhere; text-decoration: none; }
.contact-main a:hover { text-decoration: underline; }
.contact-main small { font-size: 14px; color: #DCE3FF; }
.contact-alt { border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; display: flex; flex-direction: column; gap: 6px; }
.contact-alt a { color: var(--ink); font-family: var(--mono); font-weight: 600; font-size: clamp(16px, 4.2vw, 20px); overflow-wrap: anywhere; text-decoration: none; }

.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { padding-top: 24px; padding-bottom: 24px; font-size: 13px; line-height: 1.6; color: var(--muted); }

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