/*
Theme Name: Katerina Molyva — Coming Soon
Theme URI: https://katerinamolyva.gr
Author: Katerina Molyva
Author URI: https://www.linkedin.com/in/katerinamolyva/
Description: Cinematic single-screen "Coming Soon" holding page for katerinamolyva.gr. Light/dark invert toggle, GSAP load sequence, preview accordion, client logo marquee.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: katerinamolyva-comingsoon
*/

/* ───────────────────────── Tokens ───────────────────────── */

:root,
html[data-theme="light"] {
  --bg: #F3F2EE;
  --bg-raised: #E9E6DF;
  --fg: #1E1E1C;
  --fg-soft: rgba(30, 30, 28, 0.58);
  --fg-faint: rgba(30, 30, 28, 0.30);
  --hairline: rgba(30, 30, 28, 0.13);
  --hairline-soft: rgba(30, 30, 28, 0.06);
  --accent: #fec6c5;
  --logo-filter: brightness(0);
  --grain-opacity: 0.04;
  --cursor-blend: multiply;
  --font-heading: "Bricolage Grotesque", "General Sans", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", Menlo, monospace;
  --font-serif: "Instrument Serif", "Bricolage Grotesque", serif;
  --ease-ui: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-underline: cubic-bezier(0.7, 0, 0.2, 1);
}

html[data-theme="dark"] {
  --bg: #1B1B1A;
  --bg-raised: #26241F;
  --fg: #EAE7E1;
  --fg-soft: rgba(234, 231, 225, 0.62);
  --fg-faint: rgba(234, 231, 225, 0.30);
  --hairline: rgba(234, 231, 225, 0.12);
  --hairline-soft: rgba(234, 231, 225, 0.06);
  --logo-filter: brightness(0) invert(1);
  --grain-opacity: 0.05;
  --cursor-blend: difference;
}

/* ───────────────────────── Base ───────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

body {
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  transition: background 0.6s ease, color 0.6s ease;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

html.cs-custom-cursor * { cursor: none !important; }

/* ───────────────────────── Root layout ───────────────────────── */

.cs-root {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: background 0.6s ease, color 0.6s ease;
}

/* accent glow — position & intensity driven by JS */
.cs-glow {
  position: absolute;
  top: -8%;
  left: 42%;
  width: 70vw;
  height: 70vw;
  max-width: 1100px;
  max-height: 1100px;
  background: radial-gradient(circle at center,
    color-mix(in srgb, var(--accent) 38%, transparent) 0%,
    color-mix(in srgb, var(--accent) 18%, transparent) 35%,
    transparent 68%);
  filter: blur(20px);
  pointer-events: none;
  opacity: 0.9;
  will-change: transform, opacity;
}

/* grain */
.cs-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* inset corner frame */
.cs-frame {
  position: absolute;
  inset: 18px;
  border: 1px solid var(--hairline-soft);
  pointer-events: none;
}

/* custom cursor */
.cs-cursor-dot {
  position: fixed;
  left: 0;
  top: 0;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  margin-top: -6px;
  border: 1px solid var(--fg);
  background: transparent;
  border-radius: 100px;
  pointer-events: none;
  z-index: 200;
  opacity: 0;
  mix-blend-mode: var(--cursor-blend);
  transition: width 0.35s var(--ease-ui), height 0.35s var(--ease-ui),
    margin 0.35s var(--ease-ui), background 0.3s, border-color 0.3s, opacity 0.2s;
}

.cs-cursor-dot.is-hover {
  width: 56px;
  height: 56px;
  margin-left: -28px;
  margin-top: -28px;
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
}

/* ───────────────────────── Shared atoms ───────────────────────── */

.cs-marker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-soft);
}

.cs-marker--strong { color: var(--fg); }

.cs-link {
  position: relative;
  text-decoration: none;
}

.cs-ext-arrow {
  display: inline-block;
  vertical-align: middle;
  margin-left: 3px;
  margin-bottom: 2px;
}

.cs-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease-underline);
}

.cs-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.cs-magnetic {
  display: inline-flex;
  transition: transform 0.5s var(--ease-ui);
  will-change: transform;
}

/* ───────────────────────── Top bar ───────────────────────── */

.cs-topbar {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 30px 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cs-wordmark {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.015em;
}

.cs-topbar-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.cs-invert {
  width: 34px;
  height: 34px;
  border-radius: 100px;
  border: 1px solid var(--hairline);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  color: var(--fg);
  transition: border-color 0.3s ease;
}

.cs-invert:hover { border-color: var(--fg-soft); }

.cs-invert-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid var(--fg);
  background: linear-gradient(90deg, var(--fg) 0 50%, transparent 50% 100%);
  transform: none;
  transition: transform 0.5s var(--ease-ui);
}

html[data-theme="dark"] .cs-invert-dot { transform: rotate(180deg); }

.cs-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border: 1px solid var(--fg);
  border-radius: 100px;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
}

.cs-cta-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: cs-dot-pulse 2s ease-in-out infinite;
}

@keyframes cs-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
  50%       { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 0%, transparent); }
}

/* ───────────────────────── Stage ───────────────────────── */

.cs-stage {
  position: relative;
  z-index: 10;
  flex: 1;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 44px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cs-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 38px;
}

.cs-eyebrow-rule {
  width: 26px;
  height: 1px;
  background: var(--accent);
}

.cs-hero {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(54px, 11.5vw, 180px);
  line-height: 0.9;
  letter-spacing: -0.05em;
  text-wrap: pretty;
}

.cs-hmask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}

.cs-hline { display: block; }

.cs-hline--soft { color: var(--fg-soft); }

.cs-hero-period {
  color: var(--accent);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.cs-lead {
  margin: 0;
  font-size: clamp(18px, 1.9vw, 23px);
  line-height: 1.5;
  color: var(--fg-soft);
  max-width: 680px;
  font-weight: 400;
}

.cs-lead strong {
  color: var(--fg);
  font-weight: 500;
}

.cs-lead-sub {
  display: block;
  margin-top: 18px;
  color: var(--fg-faint);
}

/* ───────────────────────── Accordion ───────────────────────── */

.cs-acc {
  margin-top: clamp(44px, 5vw, 72px);
  display: flex;
  flex-direction: column;
}

.cs-acc-item {
  border-top: 1px solid var(--hairline);
  padding: 24px 0;
  cursor: pointer;
  transition: padding 0.5s var(--ease-ui);
}

.cs-acc-item:last-child { border-bottom: 1px solid var(--hairline); }

.cs-acc-item.is-open { padding: 32px 0 36px; }

.cs-acc-head {
  display: grid;
  grid-template-columns: 64px 1fr 1.2fr 36px;
  gap: 24px;
  align-items: baseline;
}

.cs-acc-title {
  margin: 0;
  font-family: var(--font-heading);
  letter-spacing: -0.025em;
  line-height: 1;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 500;
  color: var(--fg-soft);
  transition: all 0.5s var(--ease-ui);
}

.cs-acc-item.is-open .cs-acc-title {
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 700;
  color: var(--fg);
}

.cs-acc-short {
  font-size: 14px;
  color: var(--fg-soft);
  opacity: 1;
  transition: opacity 0.3s, color 0.3s;
}

.cs-acc-item:hover .cs-acc-short { color: var(--fg); }

.cs-acc-item.is-open .cs-acc-short { opacity: 0; }

.cs-acc-plus {
  font-family: var(--font-mono);
  font-size: 18px;
  text-align: right;
  color: var(--fg-soft);
  transform: rotate(0);
  transition: transform 0.5s var(--ease-ui), color 0.3s;
}

.cs-acc-item.is-open .cs-acc-plus {
  color: var(--accent);
  transform: rotate(45deg);
}

.cs-acc-body {
  display: grid;
  grid-template-columns: 64px 1.2fr 1fr 36px;
  gap: 24px;
  margin-top: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.5s var(--ease-ui);
}

.cs-acc-item.is-open .cs-acc-body {
  margin-top: 22px;
  max-height: 260px;
  opacity: 1;
}

.cs-acc-text {
  margin: 0;
  font-size: 15px;
  color: var(--fg-soft);
  line-height: 1.6;
  max-width: 520px;
}

.cs-acc-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-faint);
  text-transform: uppercase;
  align-self: start;
}

/* ───────────────────────── Clients marquee ───────────────────────── */

.cs-clients {
  margin-top: clamp(48px, 5vw, 80px);
  padding-top: clamp(38px, 4vw, 54px);
  /* border-top: 1px solid var(--hairline); */
}

.cs-clients-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.cs-marquee {
  display: flex;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.cs-marquee-track {
  display: flex;
  gap: 14px;
  padding-right: 14px;
  flex: 0 0 auto;
  will-change: transform;
  animation: cs-scroll 52s linear infinite;
  animation-play-state: paused;
}

.cs-clients.is-live .cs-marquee-track            { animation-play-state: running; }
.cs-clients.is-live .cs-marquee:hover .cs-marquee-track { animation-play-state: paused; }

.cs-marquee-track > * { flex: 0 0 auto; }

.cs-marquee + .cs-marquee { margin-top: 14px; }

.cs-marquee-track--rev {
  transform: translateX(-50%); /* matches animation 'from'; prevents iOS Safari first-frame flash */
  animation-name: cs-scroll-rev;
}

@keyframes cs-scroll {
  to { transform: translateX(-50%); }
}

@keyframes cs-scroll-rev {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

.cs-logo {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 26px;
}

.cs-logo-link {
  display: contents;
}

.cs-logo-tip {
  position: fixed;
  pointer-events: none;
  z-index: 300;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--fg);
  color: var(--bg);
  padding: 5px 12px 6px;
  border-radius: 100px;
  opacity: 0;
  transform: scale(0.82) translateY(4px);
  transition: opacity 0.18s ease, transform 0.22s var(--ease-ui);
  will-change: left, top;
}

.cs-logo-tip.is-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* CPT logos are colour-matched per mode — no CSS filter needed */
.cs-logo--custom .cs-logo-img { filter: none; }

/* Dual-mode visibility — double-class for higher specificity than .cs-logo-img { display:block } */
.cs-logo-img.cs-logo-img--dark { display: none; }

html[data-theme="dark"] .cs-logo-img.cs-logo-img--light { display: none; }
html[data-theme="dark"] .cs-logo-img.cs-logo-img--dark  { display: block; }

.cs-logo-img {
  max-height: 30px;
  max-width: 140px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: var(--logo-filter);
  opacity: 0.85;
  transition: opacity 0.45s ease, filter 0.4s ease;
}

.cs-logo:hover .cs-logo-img { opacity: 1; }

/* ───────────────────────── Contact ───────────────────────── */

.cs-contact {
  margin-top: clamp(56px, 6vw, 92px);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  align-items: end;
}

.cs-contact-value {
  margin-top: 12px;
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 500;
}

.cs-contact-value a { color: var(--fg); }

.cs-contact-value--muted { color: var(--fg-soft); }

/* ───────────────────────── Footer ───────────────────────── */

.cs-foot {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 26px 44px;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ───────────────────────── Load reveal (no-JS / reduced-motion safe) ───────────────────────── */

/* GSAP animates from hidden — these defaults keep everything visible if JS fails */
.cs-frame { opacity: 1; }

html.cs-anim .cs-frame { opacity: 0; }

/* ───────────────────────── Responsive ───────────────────────── */

@media (max-width: 760px) {
  .cs-topbar { padding: 20px 24px; }
  .cs-topbar-right { gap: 14px; }
  .cs-topbar-role { display: none; }
  .cs-stage { padding: 0 24px 40px; }
  .cs-acc-head { grid-template-columns: 40px 1fr 30px; }
  .cs-acc-short { display: none; }
  .cs-acc-body { grid-template-columns: 40px 1fr; }
  .cs-acc-meta, .cs-acc-spacer-end { display: none; }
  .cs-contact { grid-template-columns: 1fr; gap: 28px; }
  .cs-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}

/* ───────────────────────── Reduced motion ───────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .cs-marquee-track { animation: none; }
  .cs-acc-item,
  .cs-acc-title,
  .cs-acc-body,
  .cs-acc-plus,
  .cs-invert-dot,
  .cs-magnetic { transition: none; }
}
