/* ============================================================
   drlee.ru — Coming soon
   Brand: Porcelain & Pearl
   Type: Cormorant Garamond × Inter
   ============================================================ */

:root,
[data-theme="light"] {
  --bone: #f6f1ea;
  --ivory: #fbf8f3;
  --pearl: #ece3d6;
  --ink: #1b2a2e;
  --ink-2: #243639;
  --teal: #2f5d62;
  --gold: #b6904a;
  --gold-soft: #c9a86a;
  --muted: #6b7570;

  --color-bg: var(--bone);
  --color-surface: var(--ivory);
  --color-text: var(--ink);
  --color-text-muted: var(--muted);
  --color-text-faint: #8a938f;
  --color-ring: var(--ink);
  --color-accent: var(--teal);
  --color-frame: color-mix(in oklab, var(--gold) 55%, transparent);
  --glow: color-mix(in oklab, var(--gold) 22%, transparent);
  --grain: color-mix(in oklab, var(--ink) 4%, transparent);

  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-xl: clamp(1.5rem, 1.1rem + 1.6vw, 2.125rem);

  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-interactive: 180ms var(--ease-out);
  --mark-size: clamp(176px, 32vw, 260px);
}

[data-theme="dark"] {
  --color-bg: #152022;
  --color-surface: #1b2a2e;
  --color-text: #f6f1ea;
  --color-text-muted: #b7b0a4;
  --color-text-faint: #8a847a;
  --color-ring: #f6f1ea;
  --color-accent: var(--gold-soft);
  --color-frame: color-mix(in oklab, var(--gold-soft) 50%, transparent);
  --glow: color-mix(in oklab, var(--gold) 28%, transparent);
  --grain: color-mix(in oklab, #fff 3.5%, transparent);
}

body {
  min-height: 100dvh;
  min-height: 100svh;
  overflow-x: hidden;
  background: var(--color-bg);
}

/* Invitation frame */
.frame {
  position: fixed;
  inset: clamp(16px, 3.2vw, 36px);
  z-index: 2;
  pointer-events: none;
}

.frame span {
  position: absolute;
  width: clamp(22px, 4vw, 36px);
  height: clamp(22px, 4vw, 36px);
  border-color: var(--color-frame);
  border-style: solid;
  border-width: 0;
}

.frame .tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.frame .tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.frame .bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.frame .br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

.theme-switch {
  position: fixed;
  top: max(22px, env(safe-area-inset-top));
  right: max(22px, env(safe-area-inset-right));
  z-index: 5;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
}

.theme-switch-track {
  position: relative;
  display: block;
  width: 42px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--ink) 18%, transparent);
  background: var(--ivory);
  transition:
    background var(--transition-interactive),
    border-color var(--transition-interactive);
}

.theme-switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--gold) 0%, transparent);
  transition:
    transform var(--transition-interactive),
    background var(--transition-interactive),
    box-shadow var(--transition-interactive);
}

.theme-switch:hover .theme-switch-track {
  border-color: var(--gold);
}

.theme-switch:active .theme-switch-knob {
  transform: scale(0.94);
}

[data-theme="dark"] .theme-switch-track {
  background: #1b2a2e;
  border-color: color-mix(in oklab, var(--gold-soft) 45%, transparent);
}

[data-theme="dark"] .theme-switch-knob {
  transform: translateX(20px);
  background: var(--gold);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--gold) 35%, transparent);
}

[data-theme="dark"] .theme-switch:active .theme-switch-knob {
  transform: translateX(20px) scale(0.94);
}

/* Stage */
.stage {
  position: relative;
  z-index: 3;
  min-height: 100dvh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding:
    max(var(--space-16), env(safe-area-inset-top))
    max(var(--space-6), env(safe-area-inset-right))
    max(var(--space-12), env(safe-area-inset-bottom))
    max(var(--space-6), env(safe-area-inset-left));
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: min(560px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-8);
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

/* Mark */
.mark-wrap {
  position: relative;
  width: var(--mark-size);
  height: var(--mark-size);
  margin-bottom: var(--space-8);
}

.mark-wrap::before {
  content: "";
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 68%);
  pointer-events: none;
}

.mark {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.mark-ring {
  fill: none;
  stroke: var(--color-ring);
  stroke-width: 1.15;
  opacity: 0.38;
}

.mark-l {
  fill: none;
  stroke: var(--color-ring);
  stroke-width: 2.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mark-arc {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2.55;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px color-mix(in oklab, var(--gold) 45%, transparent));
  animation: arc-glow 3.6s ease-in-out 0.4s infinite;
}

@keyframes arc-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}

.wordmark {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-xl);
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--color-text);
  margin-bottom: var(--space-6);
}

.wordmark .sep {
  color: var(--gold);
  font-style: italic;
  font-weight: 400;
  padding: 0 0.28em;
}

.rule {
  width: 48px;
  height: 1px;
  background: var(--gold);
  opacity: 0.7;
  margin-bottom: var(--space-6);
  border: 0;
}

.status {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  letter-spacing: 0.01em;
  margin-bottom: var(--space-8);
}

.mail {
  font-size: var(--text-sm);
  color: var(--color-text);
  letter-spacing: 0.04em;
  border-bottom: 1px solid color-mix(in oklab, var(--gold) 55%, transparent);
  padding-bottom: 2px;
  transition:
    color var(--transition-interactive),
    border-color var(--transition-interactive);
}

.mail:hover {
  color: var(--teal);
  border-color: var(--gold);
}

[data-theme="dark"] .mail:hover {
  color: var(--gold-soft);
}

.foot {
  position: fixed;
  left: 0;
  right: 0;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 4;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  font-weight: 500;
}

/* Текст сразу читаем; мягкое проявление без стартовой невидимости */
.eyebrow,
.wordmark,
.rule,
.status,
.mail,
.foot {
  animation: fade 0.8s var(--ease-out) both;
}

.eyebrow { animation-delay: 0.05s; }
.wordmark { animation-delay: 0.12s; }
.rule { animation-delay: 0.2s; }
.status { animation-delay: 0.28s; }
.mail { animation-delay: 0.36s; }
.foot { animation-delay: 0.45s; }

@keyframes fade {
  from { opacity: 0.35; }
  to { opacity: 1; }
}

@media (max-width: 520px) {
  .wordmark {
    flex-direction: column;
    align-items: center;
    gap: 0.12em;
  }

  .wordmark .sep {
    line-height: 0.7;
    padding: 0;
    font-size: 0.85em;
  }

  .eyebrow {
    margin-bottom: var(--space-8);
  }

  .mark-wrap {
    margin-bottom: var(--space-8);
  }
}

@media (max-height: 620px) {
  .mark-wrap {
    --mark-size: 132px;
    margin-bottom: var(--space-6);
  }

  .eyebrow {
    margin-bottom: var(--space-6);
  }

  .wordmark {
    margin-bottom: var(--space-4);
  }
}
