/* Oriental — mobile-first luxury + atelier night */
:root {
  --display: "Cinzel", "Times New Roman", serif;
  --tap: 48px;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

.container {
  width: min(100% - 1.5rem, 1100px);
  padding-inline: max(0px, env(safe-area-inset-left)) max(0px, env(safe-area-inset-right));
}
@media (min-width: 640px) {
  .container { width: min(100% - 2rem, 1100px); }
}

.site-header {
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid rgba(176, 141, 87, 0.22);
}

.header-inner {
  padding: 0.55rem 0;
  gap: 0.5rem;
}
@media (min-width: 640px) {
  .header-inner { padding: 0.85rem 0; }
}

.brand {
  min-width: 0;
  color: var(--header-text, #f4efe4);
}

.brand-text strong {
  font-family: var(--display);
  letter-spacing: 0.14em;
  font-size: 0.82rem;
}
@media (min-width: 640px) {
  .brand-text strong { font-size: 0.95rem; }
}

.brand-subtitle {
  display: none;
  color: var(--header-text) !important;
  opacity: 0.72;
}
@media (min-width: 480px) {
  .brand-subtitle { display: block; }
}

.theme-toggle {
  width: var(--tap);
  height: var(--tap);
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  color: var(--header-text, #f4efe4);
  border-color: rgba(212, 188, 138, 0.28);
}

.main-content {
  padding: 0.85rem 0 5.5rem;
}
@media (min-width: 640px) {
  .main-content { padding: 1.5rem 0 3rem; }
}

.app-bg {
  background:
    radial-gradient(520px 240px at 12% -8%, rgba(176, 141, 87, 0.26), transparent 58%),
    radial-gradient(420px 220px at 100% 0%, rgba(31, 107, 90, 0.2), transparent 55%),
    linear-gradient(168deg, #0e1a18 0%, #16302b 26%, #f4efe6 26.08%, #ebe4d6 100%);
}
@media (min-width: 900px) {
  .app-bg {
    background:
      radial-gradient(640px 280px at 8% -8%, rgba(176, 141, 87, 0.28), transparent 58%),
      radial-gradient(520px 260px at 100% 0%, rgba(31, 107, 90, 0.22), transparent 55%),
      linear-gradient(168deg, #0e1a18 0%, #16302b 30%, #f4efe6 30.06%, #ebe4d6 100%);
  }
}

.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
}

.hero-card {
  padding: 1.15rem 1rem 1.35rem;
  margin-top: 0.35rem;
  text-align: center;
}
@media (min-width: 640px) {
  .hero-card { padding: clamp(1.5rem, 5vw, 3rem); margin-top: 1rem; }
}

.hero-kicker {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: #b08d57;
  text-transform: uppercase;
}

.hero-title,
.brand-title,
.product-title {
  font-family: var(--display);
}

.oriental-hero .hero-title {
  font-size: clamp(2rem, 11vw, 4.4rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: 0.12em;
  color: var(--text);
  margin-bottom: 0.65rem;
}

.hero-subtitle {
  font-size: 0.92rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
  max-width: 36rem;
  padding-inline: 0.15rem;
}

.serial-form {
  max-width: none;
  margin: 0 auto 1.25rem;
}

.input-group-modern {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.input-group-modern .btn {
  width: 100%;
  min-height: var(--tap);
}
.input-modern {
  min-height: var(--tap);
  font-size: 16px; /* iOS zoom lock */
}
@media (min-width: 640px) {
  .input-group-modern {
    flex-direction: row;
    align-items: stretch;
  }
  .input-group-modern .btn {
    width: auto;
    flex: 0 0 auto;
    min-width: 7.5rem;
  }
}

.flow-steps {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  gap: 0.65rem;
}
.flow-step {
  padding: 0.75rem 0.85rem;
}
.flow-step-num {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--tag-gradient-start), var(--tag-gradient-end));
  color: var(--text-on-accent);
}

.btn {
  min-height: var(--tap);
  -webkit-tap-highlight-color: transparent;
}
.btn-primary {
  background: linear-gradient(135deg, var(--btn-gradient-start), var(--btn-gradient-end));
  color: var(--text-on-accent);
  box-shadow: 0 10px 24px var(--accent-glow);
}
.btn-lg { width: 100%; }
@media (min-width: 640px) {
  .btn-lg { width: auto; }
}

.product-layout {
  gap: 0.85rem;
}
.product-media {
  min-height: 0;
  padding: 0.85rem;
}
.product-image {
  width: 100%;
  max-height: min(58vw, 340px);
  object-fit: contain;
}
@media (min-width: 768px) {
  .product-media { min-height: 360px; padding: clamp(1rem, 3vw, 1.75rem); }
  .product-image { max-height: 420px; }
}

.success-actions,
.activation-cta {
  display: grid;
  gap: 0.65rem;
}
.success-actions .btn,
.activation-cta .btn {
  width: 100%;
}

.modal-overlay {
  padding: 0;
  align-items: flex-end;
}
.modal-sheet {
  max-width: 100%;
  width: 100%;
  border-radius: 20px 20px 0 0;
  padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
  background: var(--surface);
}
@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
    padding: 1rem;
  }
  .modal-sheet {
    max-width: 440px;
    border-radius: 24px;
    padding: 1.75rem;
  }
}

.otp-container {
  gap: 0.35rem;
  flex-wrap: nowrap;
}
.otp-digit {
  width: clamp(40px, 12vw, 56px);
  height: clamp(48px, 14vw, 64px);
}

.site-footer {
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  font-size: 0.82rem;
}

.support-fab {
  bottom: max(1rem, env(safe-area-inset-bottom)) !important;
}

/* —— Night: lacquer atelier, champagne gold, ivory type —— */
[data-theme="dark"] .app-bg {
  background:
    radial-gradient(520px 280px at 8% -10%, rgba(212, 188, 138, 0.16), transparent 55%),
    radial-gradient(480px 260px at 100% 0%, rgba(143, 206, 190, 0.08), transparent 50%),
    linear-gradient(180deg, #090b0a 0%, #101413 42%, #0c100f 100%);
}

[data-theme="dark"] .glass-card,
[data-theme="dark"] .modal-sheet,
[data-theme="dark"] .flow-step {
  background: #161c1a;
  border-color: rgba(212, 188, 138, 0.16);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .oriental-hero .hero-title,
[data-theme="dark"] .hero-title,
[data-theme="dark"] .product-title,
[data-theme="dark"] .modal-title {
  color: #f4efe4;
}

[data-theme="dark"] .hero-kicker {
  color: #d4bc8a;
}

[data-theme="dark"] .hero-subtitle,
[data-theme="dark"] .field-hint,
[data-theme="dark"] .flow-step-body span,
[data-theme="dark"] .modal-desc {
  color: #b3bdb8;
}

[data-theme="dark"] .input-modern,
[data-theme="dark"] .otp-digit {
  background: #121816;
  color: #f4efe4;
  border-color: rgba(212, 188, 138, 0.22);
}

[data-theme="dark"] .input-modern:focus,
[data-theme="dark"] .otp-digit:focus {
  border-color: #d4bc8a;
  box-shadow: 0 0 0 4px rgba(212, 188, 138, 0.18);
}

[data-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, #e2d0a8, #c4a574);
  color: #14110c;
  box-shadow: 0 12px 28px rgba(196, 165, 116, 0.28);
}

[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .btn-ghost {
  color: #f4efe4;
  border-color: rgba(212, 188, 138, 0.22);
  background: transparent;
}

[data-theme="dark"] .chip,
[data-theme="dark"] .service-badge,
[data-theme="dark"] .hero-badge {
  color: #e2d0a8;
  border-color: rgba(212, 188, 138, 0.24);
}

[data-theme="dark"] .spec-table th,
[data-theme="dark"] .spec-table td {
  color: #f4efe4;
  border-color: rgba(212, 188, 138, 0.12);
}

[data-theme="dark"] .theme-toggle {
  background: rgba(212, 188, 138, 0.1);
  color: #f4efe4;
}

[data-theme="dark"] .site-footer {
  color: #b3bdb8;
}

@media (prefers-reduced-motion: reduce) {
  .app-bg { animation: none; }
}
