/* ============================================================
   Design 5 — "DIPTYCH"
   Hard vertical split. Charcoal left (logo + social).
   Ash right (headline + countdown + form).
   ============================================================ */

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

:root {
  --teal:    #6FA7A3;
  --charcoal:#1E1E1E;
  --coral:   #DD6F56;
  --ash:     #EEECE7;
  --sage:    #8DA48F;
  --font-head: 'Poppins', sans-serif;
  --font-body: 'Nunito', sans-serif;
}

html, body { height: 100%; overflow: hidden; }

body {
  background: var(--charcoal);
  font-family: var(--font-body);
}

/* ── Grain ──────────────────────────────────────────────── */

.grain-filter { position: fixed; width: 0; height: 0; }

.grain {
  position: fixed;
  inset: 0;
  filter: url(#grain);
  opacity: 0.055;
  pointer-events: none;
  z-index: 100;
  background: var(--ash);
}

/* ── Split wrapper ───────────────────────────────────────── */

.split {
  display: grid;
  grid-template-columns: 38% 62%;
  height: 100dvh;
}

/* ── Shared panel base ───────────────────────────────────── */

.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Dark (left) panel ───────────────────────────────────── */

.panel--dark {
  background: var(--charcoal);
  color: var(--ash);
  padding: 2.5rem 2rem;
  border-right: 1px solid rgba(238,236,231,0.08);
  align-items: center;
  animation: fade-in 0.5s ease both;
}

/* Vertical rotated label */
.panel__vert-label {
  position: absolute;
  top: 50%;
  left: -2.2rem;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: center center;
  font-family: var(--font-head);
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(238,236,231,0.2);
  white-space: nowrap;
}

/* Logo area — centred in panel */
.panel__logo-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Subtle animated ring behind logo */
.panel__logo-ring {
  position: absolute;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(111,167,163,0.2);
  border-radius: 50%;
  animation: spin 30s linear infinite;
}

.panel__logo-ring::after {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px dashed rgba(111,167,163,0.12);
  border-radius: 50%;
}

.panel__logo {
  width: 110px;
  height: 110px;
  object-fit: contain;
  border-radius: 14px;
  position: relative;
  z-index: 1;
  animation: logo-pop 0.8s 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Dark panel footer */
.panel__dark-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  animation: fade-in 0.5s 0.6s ease both;
}

.panel__social {
  display: flex;
  gap: 1rem;
}

.panel__social a {
  color: rgba(238,236,231,0.3);
  text-decoration: none;
  transition: color 0.2s;
  display: inline-flex;
}

.panel__social a svg { width: 18px; height: 18px; }
.panel__social a:hover { color: var(--teal); }

.panel__copy {
  font-size: 0.65rem;
  color: rgba(238,236,231,0.2);
  letter-spacing: 0.1em;
}

/* ── Light (right) panel ─────────────────────────────────── */

.panel--light {
  background: var(--ash);
  color: var(--charcoal);
  padding: 2.5rem 3.5rem;
}

/* Top strip */
.panel__light-header {
  margin-bottom: 2rem;
  animation: fade-in 0.5s 0.1s ease both;
}

.panel__eyebrow {
  display: block;
  font-family: var(--font-head);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.75rem;
}

/* Progress / loading bar decoration */
.panel__progress {
  width: 100%;
  height: 2px;
  background: rgba(30,30,30,0.1);
  border-radius: 2px;
  overflow: hidden;
}

.panel__progress-bar {
  height: 100%;
  background: var(--coral);
  border-radius: 2px;
  width: 0%;
  animation: progress-fill 2.5s 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Content area — centred vertically */
.panel__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: slide-in 0.7s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Heading */
.panel__heading {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(4rem, 8vw, 8rem);
  line-height: 0.9;
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
}

.panel__heading-line { display: block; overflow: hidden; }

.panel__heading-line--1 {
  color: var(--charcoal);
  animation: slide-up 0.7s 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.panel__heading-line--2 {
  animation: slide-up 0.7s 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.panel__heading-line--2 em {
  font-style: italic;
  color: var(--coral);
}

/* Body */
.panel__body {
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  line-height: 1.8;
  color: rgba(30,30,30,0.6);
  max-width: 460px;
  margin-bottom: 2rem;
}

/* Countdown */
.panel__countdown {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}

.panel__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--charcoal);
  color: var(--ash);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  min-width: 58px;
}

.panel__val {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 900;
  line-height: 1;
}

.panel__lbl {
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-top: 0.25rem;
}

.panel__sep {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--coral);
  align-self: center;
  margin-bottom: 1rem;
  animation: blink 1.2s step-start infinite;
}

/* Form */
.panel__form-label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(30,30,30,0.5);
  margin-bottom: 0.6rem;
}

.panel__form-row { display: flex; max-width: 420px; }

.panel__input {
  flex: 1;
  padding: 0.9rem 1.2rem;
  border: 1.5px solid var(--charcoal);
  border-right: none;
  border-radius: 4px 0 0 4px;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--charcoal);
  outline: none;
  transition: border-color 0.2s;
}

.panel__input::placeholder { color: rgba(30,30,30,0.3); }
.panel__input:focus { border-color: var(--teal); }

.panel__btn {
  padding: 0.9rem 1.4rem;
  background: var(--coral);
  color: #fff;
  border: 1.5px solid var(--coral);
  border-radius: 0 4px 4px 0;
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.panel__btn:hover { background: #c95d45; border-color: #c95d45; }

.panel__confirm {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--sage);
  font-weight: 600;
}
.panel__confirm[hidden] { display: none; }

/* ── Keyframes ───────────────────────────────────────────── */

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slide-in {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(60px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes logo-pop {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes progress-fill {
  from { width: 0%; }
  to   { width: 72%; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

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

@media (max-width: 780px) {
  html, body { overflow-y: auto; height: auto; }
  .split { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: auto; }
  .panel--dark {
    flex-direction: row;
    align-items: center;
    padding: 1.5rem;
    min-height: 100px;
  }
  .panel__vert-label { display: none; }
  .panel__logo-wrap { flex: 0; }
  .panel__logo { width: 60px; height: 60px; }
  .panel__logo-ring { width: 90px; height: 90px; }
  .panel--light { padding: 2rem 1.5rem; min-height: auto; }
  .panel__content { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
