/* ==========================================================================
   book.ai.id — Editorial Design System
   Minimal, Understated, Premium Digital Property
   ========================================================================== */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Dark theme (Default / Obsidian) */
  --bg-primary: #0A0B0E;
  --bg-surface: #12141A;
  --bg-surface-hover: #1A1D25;
  --text-primary: #F4F4F6;
  --text-secondary: #9497A3;
  --text-muted: #5F6370;
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(255, 255, 255, 0.18);
  --focus-ring: #FFFFFF;
  --status-dot: #888C9B;
  --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
  /* Light theme (Refined Swiss / Chalk) */
  --bg-primary: #FBFBFC;
  --bg-surface: #F1F2F6;
  --bg-surface-hover: #E7E9EF;
  --text-primary: #0F1015;
  --text-secondary: #525562;
  --text-muted: #8B8E9C;
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.16);
  --focus-ring: #0F1015;
  --status-dot: #636775;
  --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}

/* Base reset & layout */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Site wrapper */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.75rem 2rem;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  user-select: none;
  margin-bottom: 2.25rem;
}

.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--status-dot);
  display: inline-block;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-toggle:hover {
  color: var(--text-primary);
  background-color: var(--bg-surface);
  border-color: var(--border-hover);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Theme icon switching */
.icon-sun {
  display: none;
}

.icon-moon {
  display: block;
}

[data-theme="light"] .icon-sun {
  display: block;
}

[data-theme="light"] .icon-moon {
  display: none;
}

/* Hero section */
.hero-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
}

.hero-container {
  width: 100%;
  max-width: 800px;
  text-align: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Hero Typography: The Domain is the Hero */
.domain-headline {
  font-size: clamp(3.25rem, 8.5vw, 6.25rem);
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  word-break: break-word;
}

.domain-name {
  color: var(--text-primary);
}

.domain-tld {
  color: var(--text-secondary);
  font-weight: 550;
}

.supporting-text {
  font-size: clamp(1.125rem, 2.2vw, 1.35rem);
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.5;
  max-width: 520px;
  margin-bottom: 2.5rem;
}

/* Contact Module */
.contact-module {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--card-shadow);
  border-radius: 9999px;
  padding: 0.375rem 0.45rem 0.375rem 1.15rem;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.contact-module:hover {
  border-color: var(--border-hover);
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
  padding: 0.35rem 0.25rem;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.contact-icon {
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.contact-link:hover {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.contact-link:hover .contact-icon {
  color: var(--text-primary);
}

.contact-link:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Copy email button */
.copy-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.copy-button:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.copy-button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.copy-icon {
  flex-shrink: 0;
}

.copy-check {
  display: none;
}

.copy-button.copied {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background-color: var(--bg-surface-hover);
}

.copy-button.copied .copy-default {
  display: none;
}

.copy-button.copied .copy-check {
  display: inline-block;
}

/* Footer */
.site-footer {
  width: 100%;
  padding-top: 2rem;
  display: flex;
  justify-content: center;
}

.footer-container {
  text-align: center;
}

.copyright {
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Screen reader utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .site-wrapper {
    padding: 1.25rem 1.25rem;
  }

  .hero-section {
    padding: 3rem 0;
  }

  .domain-headline {
    font-size: clamp(2.75rem, 13vw, 3.75rem);
    letter-spacing: -0.035em;
  }

  .supporting-text {
    font-size: 1.0625rem;
    margin-bottom: 2rem;
  }

  .contact-module {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    padding: 0.875rem 1rem;
    border-radius: 16px;
    gap: 0.75rem;
  }

  .contact-link {
    width: 100%;
    justify-content: center;
    font-size: 0.95rem;
  }

  .copy-button {
    width: 100%;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.825rem;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
