/*
Theme Name: Ma'Marula Student Living
Theme URI: https://thecolorblue.co.za
Author: The Color Blue
Author URI: https://thecolorblue.co.za
Description: Coming-soon theme for Ma'Marula Student Living — premium navy & gold one-pager with a custom waitlist module (database storage, CSV export, branded notification + auto-reply emails). 1:1 conversion from the approved static HTML.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
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: mamarula
Tags: one-column, custom-logo
*/

/* ════════════════════════════════════════════
   Ma'Marula — Coming Soon
   Identity: Proposal C — Premium Navy & Gold
   Type: System A — Cormorant Garamond + DM Sans
════════════════════════════════════════════ */
:root {
  --navy:    #1C2951;
  --deep:    #243264;
  --night2:  #131A38;
  --gold:    #E8A838;
  --ochre:   #C8813A;
  --pale:    #F2C46D;
  --ivory:   #F8F4EE;
  --cream:   #FAF3E8;
  --forest:  #3A6B4A;

  --glass-bg:     rgba(255,255,255,0.055);
  --glass-bd:     rgba(255,255,255,0.13);
  --glass-bg-2:   rgba(255,255,255,0.08);

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'DM Sans', system-ui, sans-serif;
  --font-mono:  'DM Mono', 'Courier New', monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--cream);
  background: var(--navy);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* ── Atmospheric background ───────────────── */
.bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(1200px 800px at 75% 15%, rgba(46,64,128,0.65), transparent 60%),
    radial-gradient(1000px 700px at 10% 90%, rgba(36,50,100,0.7), transparent 55%),
    linear-gradient(155deg, #243264 0%, #1C2951 52%, #131A38 100%);
}

/* drifting gold aurora blobs */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
.aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  mix-blend-mode: screen;
}
.aurora .a1 { width: 460px; height: 460px; top: -120px; right: 8%;
  background: radial-gradient(circle, rgba(232,168,56,0.55), transparent 70%);
  animation: drift1 22s var(--ease) infinite alternate; }
.aurora .a2 { width: 380px; height: 380px; bottom: -100px; left: -60px;
  background: radial-gradient(circle, rgba(200,129,58,0.5), transparent 70%);
  animation: drift2 26s var(--ease) infinite alternate; }
.aurora .a3 { width: 300px; height: 300px; top: 40%; left: 55%;
  background: radial-gradient(circle, rgba(242,196,109,0.32), transparent 70%);
  animation: drift3 30s var(--ease) infinite alternate; }

@keyframes drift1 { from { transform: translate(0,0) scale(1); } to { transform: translate(-80px,60px) scale(1.15); } }
@keyframes drift2 { from { transform: translate(0,0) scale(1); } to { transform: translate(90px,-50px) scale(1.2); } }
@keyframes drift3 { from { transform: translate(0,0) scale(1); } to { transform: translate(-60px,-70px) scale(0.9); } }

/* giant marula tree watermark */
.tree-wm {
  position: fixed;
  right: -6%;
  bottom: -8%;
  width: min(58vw, 760px);
  z-index: -1;
  opacity: 0.10;
  pointer-events: none;
  filter: brightness(0) invert(1);
  -webkit-user-select: none; user-select: none;
}

/* film grain */
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  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.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* floating gold motes */
.motes { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.mote {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  box-shadow: 0 0 8px 1px rgba(232,168,56,0.6);
  animation: rise linear infinite;
}
@keyframes rise {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-110vh) translateX(40px); opacity: 0; }
}

/* ── Shell ────────────────────────────────── */
.shell {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 64px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Top bar ──────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.brand-tree { width: 38px; height: 38px; object-fit: contain; filter: brightness(0) invert(1); flex-shrink: 0; }
.wordmark {
  font-family: var(--font-serif);
  color: var(--gold);
  line-height: 1;
}
.wordmark .wm-prefix { font-style: italic; font-weight: 300; font-size: 0.74em; letter-spacing: 0.3px; }
.wordmark .wm-main   { font-weight: 700; text-transform: uppercase; letter-spacing: 2px; }
.brand .wordmark { font-size: 19px; }
.brand-sub {
  display: block;
  font-family: var(--font-sans);
  font-size: 8px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(250,243,232,0.45);
  margin-top: 4px;
  font-weight: 500;
}

.topbar-right { display: flex; align-items: center; gap: 22px; }
.loc {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; letter-spacing: 0.5px; color: rgba(250,243,232,0.65);
}
.loc svg { width: 14px; height: 14px; stroke: var(--gold); }

.btn {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  border-radius: 100px;
  transition: transform 0.2s var(--ease), background 0.25s, box-shadow 0.25s, color 0.25s;
}
.btn-ghost {
  padding: 11px 22px;
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--glass-bd);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.3); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ── Hero ─────────────────────────────────── */
.hero {
  flex: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding: clamp(24px, 4vw, 48px) 0 56px;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.badge-soon {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold);
  background: rgba(232,168,56,0.12);
  border: 1px solid rgba(232,168,56,0.42);
  padding: 10px 20px;
  border-radius: 100px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(232,168,56,0.12);
}
.kicker-loc {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(250,243,232,0.55);
  font-weight: 500;
}
.kicker-loc::before {
  content: "";
  width: 26px; height: 1px;
  background: linear-gradient(90deg, rgba(250,243,232,0.4), transparent);
}
.pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(232,168,56,0.6);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(232,168,56,0.55); }
  70% { box-shadow: 0 0 0 10px rgba(232,168,56,0); }
  100% { box-shadow: 0 0 0 0 rgba(232,168,56,0); }
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(46px, 7vw, 104px);
  line-height: 0.94;
  letter-spacing: -1.5px;
  color: var(--cream);
  margin-bottom: 22px;
}
.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}
.hero-lead {
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.75;
  color: rgba(250,243,232,0.72);
  max-width: 30em;
  margin-bottom: 38px;
}

/* pillars */
.pillars { display: flex; gap: 26px; flex-wrap: wrap; }
.pillar {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  color: rgba(250,243,232,0.8);
}
.pillar i {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.pillar.live i  { background: var(--gold); }
.pillar.learn i { background: var(--ochre); }
.pillar.grow i  { background: var(--forest); }

/* ── Waitlist card ────────────────────────── */
.card {
  position: relative;
  background: var(--glass-bg-2);
  border: 1px solid var(--glass-bd);
  border-radius: 22px;
  padding: clamp(28px, 3vw, 40px);
  backdrop-filter: blur(26px) saturate(1.4);
  -webkit-backdrop-filter: blur(26px) saturate(1.4);
  box-shadow: 0 30px 80px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.12);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232,168,56,0.7), transparent);
}
.card-eyebrow {
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin-bottom: 12px;
}
.card-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 600;
  line-height: 1.08;
  color: var(--cream);
  margin-bottom: 10px;
}
.card-sub {
  font-size: 14px; line-height: 1.7;
  color: rgba(250,243,232,0.65);
  margin-bottom: 26px;
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(250,243,232,0.55);
  margin-bottom: 7px;
}
.field input {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--cream);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.field input::placeholder { color: rgba(250,243,232,0.32); }
.field input:hover { border-color: rgba(255,255,255,0.28); }
.field input:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px rgba(232,168,56,0.15);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.btn-gold {
  width: 100%;
  padding: 16px 24px;
  margin-top: 8px;
  background: linear-gradient(135deg, var(--gold), var(--ochre));
  color: var(--navy);
  font-weight: 600;
  letter-spacing: 1.5px;
  box-shadow: 0 10px 30px rgba(232,168,56,0.28);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(232,168,56,0.4); }
.btn-gold:active { transform: translateY(0); }
.btn-gold[disabled] { opacity: 0.7; cursor: progress; transform: none; }
.btn-gold .spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(28,41,81,0.35);
  border-top-color: var(--navy);
  animation: spin 0.7s linear infinite;
  display: none;
}
.btn-gold.loading .spinner { display: inline-block; }
.btn-gold.loading .label { opacity: 0.7; }
@keyframes spin { to { transform: rotate(360deg); } }

.microcopy {
  margin-top: 14px;
  font-size: 11.5px;
  line-height: 1.6;
  color: rgba(250,243,232,0.45);
  display: flex; align-items: flex-start; gap: 7px;
}
.microcopy svg { width: 13px; height: 13px; stroke: var(--forest); flex-shrink: 0; margin-top: 2px; }

.err {
  font-size: 12px; color: #F2A88D; margin-top: -8px; margin-bottom: 12px;
  min-height: 0; display: none;
}
.err.show { display: block; }

/* success state */
.success { display: none; text-align: center; padding: 14px 0 6px; }
.card.done .form-wrap { display: none; }
.card.done .success { display: block; animation: fadeUp 0.5s var(--ease); }
.success-mark {
  width: 64px; height: 64px; margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(58,107,74,0.18);
  border: 1px solid rgba(122,158,126,0.5);
  display: flex; align-items: center; justify-content: center;
}
.success-mark svg { width: 30px; height: 30px; stroke: #9BC6A0; }
.success h3 { font-family: var(--font-serif); font-size: 30px; font-weight: 600; color: var(--cream); margin-bottom: 10px; }
.success p { font-size: 14px; line-height: 1.7; color: rgba(250,243,232,0.7); max-width: 24em; margin: 0 auto; }
.success .pos { color: var(--gold); font-weight: 500; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ── Amenity strip ────────────────────────── */
.amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 0 0 30px;
}
.amenity {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  border-radius: 100px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-bd);
  font-size: 12.5px;
  letter-spacing: 0.4px;
  color: rgba(250,243,232,0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.amenity svg { width: 16px; height: 16px; stroke: var(--gold); flex-shrink: 0; }

/* ── Preview gallery ──────────────────────── */
.preview { padding: 10px 0 56px; }
.preview-head { max-width: 640px; margin-bottom: 30px; }
.preview-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: 4px; text-transform: uppercase;
  color: var(--gold); font-weight: 500; margin-bottom: 16px;
}
.preview-eyebrow::before { content: ""; width: 34px; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); }
.preview-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.4vw, 46px);
  font-weight: 600; line-height: 1.08; letter-spacing: -0.5px;
  color: var(--cream); margin-bottom: 14px;
}
.preview-title em { font-style: italic; color: var(--gold); }
.preview-sub { font-size: 14px; line-height: 1.75; color: rgba(250,243,232,0.62); max-width: 56ch; }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 16px;
  height: min(72vh, 560px);
}
.shot {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--glass-bd);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.shot.feature { grid-column: 1 / 3; grid-row: 1; }
.shot.tall { grid-column: 3; grid-row: 1 / 3; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.8s var(--ease); }
.shot::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(19,26,56,0.9) 0%, rgba(19,26,56,0.2) 48%, rgba(28,41,81,0.08) 100%);
  transition: opacity 0.4s;
}
.shot:hover img { transform: scale(1.06); }
.shot-cap { position: absolute; left: 0; bottom: 0; z-index: 2; padding: 18px 22px; }
.shot-cap .k { display: block; font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 5px; }
.shot-cap .t { font-family: var(--font-serif); font-size: clamp(18px, 1.8vw, 23px); font-weight: 600; color: var(--cream); line-height: 1.1; }

@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr; grid-template-rows: none; height: auto; }
  .shot, .shot.feature, .shot.tall { grid-column: auto; grid-row: auto; aspect-ratio: 16 / 10; }
}

/* ── Footer ───────────────────────────────── */
.foot {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 28px 0 36px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.foot-left { font-size: 12px; color: rgba(250,243,232,0.4); letter-spacing: 0.3px; line-height: 1.7; max-width: 56ch; }
.socials { display: flex; gap: 10px; }
.social {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-bd);
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
  cursor: pointer;
}
.social svg { width: 17px; height: 17px; fill: rgba(250,243,232,0.7); transition: fill 0.2s; }
.social:hover { background: rgba(232,168,56,0.14); border-color: rgba(232,168,56,0.4); transform: translateY(-2px); }
.social:hover svg { fill: var(--gold); }
.social:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ── Responsive ───────────────────────────── */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 8px; }
  .hero-copy { order: 1; }
  .card { order: 2; }
  .tree-wm { opacity: 0.07; width: 90vw; right: -20%; }
}
@media (max-width: 560px) {
  .topbar-right .loc { display: none; }
  .brand-sub { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .pillars { gap: 16px; }
  .foot { flex-direction: column-reverse; align-items: flex-start; }
}

/* ── Reduced motion ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .aurora span { opacity: 0.35; }
}

/* ════════════════════════════════════════════
   WordPress scaffolding (additions only —
   does not alter the approved design)
════════════════════════════════════════════ */

/* honeypot field — visually hidden anti-spam input */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* generic fallback templates (index.php / page.php) */
.wp-generic { padding: 24px 0 64px; max-width: 760px; }
.wp-generic .entry-title {
  font-family: var(--font-serif);
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 600;
  line-height: 1.05;
  color: var(--cream);
  margin-bottom: 22px;
}
.wp-generic .entry-content { font-size: 15px; line-height: 1.8; color: rgba(250,243,232,0.75); }
.wp-generic .entry-content p { margin-bottom: 1.2em; }
.wp-generic .entry-content a { color: var(--gold); }
.wp-generic .entry-content h2,
.wp-generic .entry-content h3 {
  font-family: var(--font-serif);
  color: var(--cream);
  margin: 1.4em 0 0.5em;
}
.wp-generic .entry-content ul,
.wp-generic .entry-content ol { margin: 0 0 1.2em 1.2em; }
.wp-generic .entry-content img { max-width: 100%; height: auto; border-radius: 12px; }
