/*
Theme Name: Solace
Theme URI: https://solace.brand
Author: Solace
Author URI: https://solace.brand
Description: Solace — Clothes With Meaning. A coming-soon WordPress template with a chromatic silver design, animated countdown, and newsletter signup that captures emails to the database.
Version: 1.1.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: solace
Tags: fashion, streetwear, coming-soon, minimal, dark, editorial
*/

:root {
  --solace-black:        #050507;
  --solace-graphite:     #0e0e11;
  --solace-charcoal:     #16161b;
  --solace-smoke:        #1f1f25;
  --solace-silver-deep:  #6e6e76;
  --solace-silver:       #b6b6bd;
  --solace-chrome:       #d4d4d8;
  --solace-pearl:        #ececef;
  --solace-bone:         #f4f4f5;
  --solace-glass:        rgba(255,255,255,0.04);
  --solace-line:         rgba(255,255,255,0.08);
  --solace-line-strong:  rgba(255,255,255,0.18);
  --font-display:   "Syncopate", "Helvetica Neue", Arial, sans-serif;
  --font-editorial: "Italiana", "Times New Roman", serif;
  --font-body:      "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:      "JetBrains Mono", ui-monospace, monospace;
  --ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
  --gutter: clamp(20px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--solace-black);
  color: var(--solace-pearl);
  font-family: var(--font-body);
  font-size: 16px; line-height: 1.6; font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--solace-chrome); color: var(--solace-black); }

/* Grain overlay */
body::before {
  content: ""; position: fixed; inset: 0;
  pointer-events: none; z-index: 9999;
  opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.2 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--solace-silver-deep); }

.chrome-text {
  background: linear-gradient(180deg, #ffffff 0%, #d4d4d8 28%, #8a8a92 55%, #ececef 75%, #6e6e76 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Coming-Soon layout */
body.solace-coming-soon {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  padding: clamp(20px, 3vh, 40px) var(--gutter);
  position: relative;
  overflow: hidden;
}

.cs-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.cs-bg__glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.35; animation: csFloat 14s ease-in-out infinite; }
.cs-bg__glow--a { width: 600px; height: 600px; background: radial-gradient(circle, rgba(212,212,216,0.45), transparent 70%); top: -10%; left: -10%; }
.cs-bg__glow--b { width: 700px; height: 700px; background: radial-gradient(circle, rgba(110,110,118,0.55), transparent 70%); bottom: -20%; right: -15%; animation-delay: -7s; }
.cs-bg__lines {
  position: absolute; inset: 0;
  background-image: linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(0deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
          mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  opacity: 0.5;
}
@keyframes csFloat { 0%,100%{transform:translate3d(0,0,0) scale(1);} 50%{transform:translate3d(40px,-40px,0) scale(1.08);} }

.cs-top, .cs-foot {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
}
.cs-foot { padding-top: 24px; border-top: 1px solid var(--solace-line); }
.cs-foot__center { display: none; }
@media (min-width: 760px) { .cs-foot__center { display: inline; } }

.cs-main {
  position: relative; z-index: 2;
  display: grid; place-items: center;
  padding: clamp(40px, 6vh, 80px) 0;
}
.cs-stack {
  display: flex; flex-direction: column; align-items: center;
  gap: 22px; max-width: 720px; text-align: center;
}

.cs-logo {
  width: clamp(120px, 14vw, 200px);
  height: auto;
  filter: drop-shadow(0 6px 30px rgba(255,255,255,0.06)) brightness(1.1);
  animation: csPulse 4s ease-in-out infinite;
  user-select: none;
}
@keyframes csPulse {
  0%,100% { filter: drop-shadow(0 6px 30px rgba(255,255,255,0.06)) brightness(1.05); transform: scale(1); }
  50%     { filter: drop-shadow(0 8px 40px rgba(255,255,255,0.18)) brightness(1.15); transform: scale(1.02); }
}

.cs-eyebrow { color: var(--solace-silver); }
.cs-wordmark {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(56px, 11vw, 140px);
  letter-spacing: 0.18em;
  line-height: 1; margin: 0;
  text-transform: uppercase;
}
.cs-tagline { font-family: var(--font-editorial); font-style: italic; font-size: clamp(22px, 2.6vw, 34px); color: var(--solace-pearl); margin: 0; }
.cs-sub { font-size: clamp(14px, 1.2vw, 16px); color: var(--solace-silver); max-width: 460px; margin: 0; line-height: 1.7; }

.cs-countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 1.5vw, 16px); margin-top: 14px; width: 100%; max-width: 520px; }
.cs-cell {
  display: flex; flex-direction: column; align-items: center;
  padding: 18px 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01));
  border: 1px solid var(--solace-line); border-radius: 10px;
  backdrop-filter: blur(8px);
}
.cs-cell .num { font-family: var(--font-display); font-size: clamp(24px, 3.4vw, 34px); font-weight: 700; color: var(--solace-bone); letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.cs-cell .lbl { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--solace-silver-deep); margin-top: 6px; }

.cs-form { display: flex; gap: 10px; width: 100%; max-width: 480px; margin-top: 18px; }
.cs-form input[type="email"] {
  flex: 1; padding: 18px 22px;
  background: var(--solace-glass);
  border: 1px solid var(--solace-line-strong);
  color: var(--solace-bone);
  font-family: var(--font-body); font-size: 14px;
  border-radius: 999px; outline: none;
  transition: border-color .4s, background .4s;
}
.cs-form input[type="email"]:focus { border-color: var(--solace-chrome); background: rgba(255,255,255,0.06); }
.cs-form input::placeholder { color: var(--solace-silver-deep); letter-spacing: 0.04em; }

.btn {
  background: linear-gradient(135deg, #ececef 0%, #b6b6bd 50%, #6e6e76 100%);
  color: var(--solace-black); border: none;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 18px 28px;
  font-family: var(--font-body);
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; font-weight: 600;
  border-radius: 999px;
  cursor: pointer; white-space: nowrap;
  transition: transform .4s var(--ease-out-quart), box-shadow .4s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(212,212,216,0.18); }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn .arrow { display: inline-block; transition: transform .4s var(--ease-out-quart); }
.btn:hover:not(:disabled) .arrow { transform: translateX(5px); }

.cs-msg { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; min-height: 16px; color: var(--solace-chrome); }
.cs-msg[data-state="error"] { color: #ff8b8b; }

.cs-count { display: inline-flex; align-items: center; gap: 10px; color: var(--solace-silver); }
.cs-count .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--solace-chrome); box-shadow: 0 0 12px var(--solace-chrome); animation: csPing 1.6s ease-in-out infinite; }
@keyframes csPing { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:0.4;transform:scale(0.7);} }

.fade-up { opacity: 0; transform: translate3d(0, 22px, 0); transition: opacity 1s var(--ease-out-quart), transform 1s var(--ease-out-quart); }
.fade-up.is-in { opacity: 1; transform: translate3d(0,0,0); }
.cs-stack > .fade-up:nth-child(1) { transition-delay: 80ms; }
.cs-stack > .fade-up:nth-child(2) { transition-delay: 200ms; }
.cs-stack > .fade-up:nth-child(3) { transition-delay: 340ms; }
.cs-stack > .fade-up:nth-child(4) { transition-delay: 480ms; }
.cs-stack > .fade-up:nth-child(5) { transition-delay: 600ms; }
.cs-stack > .fade-up:nth-child(6) { transition-delay: 740ms; }
.cs-stack > .fade-up:nth-child(7) { transition-delay: 880ms; }
.cs-stack > .fade-up:nth-child(8) { transition-delay: 1000ms; }
.cs-stack > .fade-up:nth-child(9) { transition-delay: 1120ms; }

@media (max-width: 600px) {
  .cs-form { flex-direction: column; }
  .cs-cell { padding: 14px 4px; }
  .cs-foot { font-size: 10px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .fade-up, .cs-logo, .cs-bg__glow { transition: none !important; animation: none !important; opacity: 1 !important; transform: none !important; }
}
