/* ============================================================
   nome.co.za — Landing page
   A gateway between CE App and NOW Matters
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Brand palette (shared by CE App + NOW Matters) */
  --pink:   #FF0066;
  --orange: #ED7D31;
  --teal:   #33CCCC;
  --gold:   #FFC000;

  /* Neutrals — warm, editorial */
  --ink:        #1A1A1A;
  --ink-soft:   #3A3A3A;
  --ink-muted:  #6B6B6B;
  --rule:       #E8E5DD;
  --paper:      #FAFAF7;
  --paper-warm: #F4F1E8;
  --paper-deep: #1F1B17;

  /* Type */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Motion */
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; transition: color 200ms var(--ease-out-soft); }
button { font-family: inherit; cursor: pointer; }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-muted);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  font-variation-settings: "SOFT" 50, "WONK" 0, "opsz" 144;
}

h1 {
  font-size: clamp(2.5rem, 6.2vw, 5.2rem);
  font-weight: 350;
}

h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
}

h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  font-weight: 450;
}

p { margin: 0 0 1em; }
p.lede {
  font-size: clamp(1.1rem, 1.6vw, 1.32rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 36ch;
}

em.italic { font-family: var(--font-display); font-style: italic; font-weight: 350; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  padding: 1.75rem 0;
  position: relative;
  z-index: 10;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-mark {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-weight: 450;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}
.site-mark .colon { color: var(--pink); font-weight: 500; padding: 0 0.05em; }
.site-mark em {
  font-style: italic;
  color: var(--ink-muted);
  font-size: 0.95rem;
  font-weight: 350;
  margin-left: 0.4rem;
}
.header-contact {
  font-size: 0.85rem;
  color: var(--ink-muted);
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.header-contact a:hover { color: var(--ink); }
@media (max-width: 720px) {
  .header-contact { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: clamp(2rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
}
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

.hero h1 .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px);
  animation: rise 900ms var(--ease-out-soft) forwards;
}
.hero h1 .word:nth-child(2) { animation-delay: 80ms; }
.hero h1 .word:nth-child(3) { animation-delay: 160ms; }
.hero h1 .word:nth-child(4) { animation-delay: 240ms; }
.hero h1 .word:nth-child(5) { animation-delay: 320ms; }
.hero h1 .word.italic {
  font-style: italic;
  font-weight: 350;
}
.hero h1 .word.accent-pink { color: var(--pink); }
.hero h1 .word.accent-teal { color: var(--teal); }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.hero-aside {
  font-size: 0.95rem;
  color: var(--ink-soft);
  border-left: 1px solid var(--rule);
  padding-left: 1.5rem;
  max-width: 30ch;
  opacity: 0;
  animation: fadeIn 700ms 600ms var(--ease-out-soft) forwards;
}
.hero-aside .eyebrow { display: block; margin-bottom: 0.6rem; color: var(--ink-soft); }

@keyframes fadeIn { to { opacity: 1; } }

.hero p.lede {
  margin-top: 1.75rem;
  opacity: 0;
  animation: fadeIn 700ms 480ms var(--ease-out-soft) forwards;
}

/* ============================================================
   GATEWAYS — two big choice cards
   ============================================================ */
.gateways {
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(4rem, 8vw, 7rem);
}
.gateways-rule {
  border-top: 1px solid var(--rule);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.gateways-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
@media (max-width: 820px) {
  .gateways-grid { grid-template-columns: 1fr; }
}

.gateway {
  position: relative;
  background: #fff;
  border: 1px solid var(--rule);
  padding: clamp(2rem, 3.5vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border-radius: 4px;
  transition: transform 400ms var(--ease-out-soft),
              box-shadow 400ms var(--ease-out-soft),
              border-color 400ms var(--ease-out-soft);
  overflow: hidden;
  min-height: 460px;
  opacity: 0;
  animation: fadeIn 800ms 700ms var(--ease-out-soft) forwards;
}
.gateway:nth-child(2) { animation-delay: 820ms; }

.gateway::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, transparent 0%, transparent 60%, var(--accent-soft, transparent) 100%);
  opacity: 0;
  transition: opacity 400ms var(--ease-out-soft);
}

.gateway:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px -28px rgba(0,0,0,0.18);
  border-color: var(--accent, var(--rule));
}
.gateway:hover::before { opacity: 1; }

.gateway--ceapp {
  --accent: var(--pink);
  --accent-soft: rgba(255, 0, 102, 0.06);
}
.gateway--nowmatters {
  --accent: var(--pink);
  --accent-soft: rgba(255, 0, 102, 0.06);
}

.gateway-mark-wrap {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.gateway-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.gateway-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.7rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.6vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1.1;
}
.gateway-name > .name { white-space: nowrap; }
.gateway-name em {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  white-space: nowrap;
}
@media (max-width: 520px) {
  .gateway-name em { flex-basis: 100%; }
}

.gateway-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 350;
  font-size: 1.1rem;
  color: var(--ink-soft);
  line-height: 1.4;
  margin-bottom: 0.4rem;
}

.gateway-blurb {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

.gateway-services {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.gateway-services span {
  font-size: 0.78rem;
  padding: 0.35rem 0.7rem;
  background: var(--paper-warm);
  color: var(--ink-soft);
  border-radius: 100px;
  letter-spacing: 0.01em;
}
.gateway-services span.soon {
  background: transparent;
  color: var(--ink-muted);
  border: 1px dashed #D6D2C7;
  font-style: italic;
}

.gateway-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.96rem;
  transition: gap 250ms var(--ease-out-soft);
}
.gateway-cta::after {
  content: '→';
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 350;
  color: var(--accent);
  transition: transform 300ms var(--ease-out-soft);
}
.gateway:hover .gateway-cta::after { transform: translateX(6px); }

/* Make each gateway clickable */
.gateway-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  text-indent: -9999px;
  overflow: hidden;
}
.gateway > *:not(.gateway-link) { position: relative; z-index: 2; }

/* ============================================================
   HERITAGE — the NO:ME story
   ============================================================ */
.heritage {
  padding: clamp(3rem, 6vw, 6rem) 0;
  background: var(--paper-warm);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.heritage-grid {
  display: grid;
  grid-template-columns: minmax(0, 320px) 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
@media (max-width: 820px) {
  .heritage-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}
.heritage-label {
  position: sticky;
  top: 2rem;
}
.heritage h2 {
  font-family: var(--font-display);
  font-weight: 350;
  font-style: italic;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.05;
  color: var(--ink);
}
.heritage h2 .accent-orange { color: var(--orange); }
.heritage h2 .accent-teal   { color: var(--teal); }
.heritage-body { font-size: 1.02rem; line-height: 1.7; color: var(--ink-soft); max-width: 60ch; }
.heritage-body p { margin-bottom: 1.2em; }
.heritage-body p:last-child { margin-bottom: 0; }
.heritage-body strong { color: var(--ink); font-weight: 600; }

.heritage-dates {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.heritage-date {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 1rem;
  font-size: 0.92rem;
  align-items: baseline;
}
.heritage-date time {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  color: var(--ink);
  font-size: 1.05rem;
}
.heritage-date span { color: var(--ink-muted); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--paper-deep);
  color: #C9C5BD;
  padding: clamp(3rem, 5vw, 4rem) 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}
.site-footer h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: #fff;
  margin: 0 0 1rem;
}
.site-footer p, .site-footer li { font-size: 0.9rem; line-height: 1.6; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer a { color: #C9C5BD; }
.site-footer a:hover { color: #fff; }
.site-footer .colophon {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.5rem;
  font-size: 0.78rem;
  color: #7F7B72;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}
.site-footer .colophon span em { font-style: italic; }
.footer-brandline {
  font-family: var(--font-display);
  font-style: italic;
  color: #E8E2D2;
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 1rem;
}

/* ============================================================
   NOW MATTERS animated mark — vanilla CSS implementation
   ============================================================ */
.nm-mark { display: block; overflow: visible; }
.nm-shape {
  transform-origin: center;
  opacity: 0;
  animation: nm-fly 620ms var(--ease-back) forwards;
}
.nm-shape[data-dir="top"]    { transform: translateY(-700px); }
.nm-shape[data-dir="bottom"] { transform: translateY( 700px); }
.nm-shape[data-dir="left"]   { transform: translateX(-700px); }
.nm-shape[data-dir="right"]  { transform: translateX( 700px); }

@keyframes nm-fly {
  to { transform: translate(0, 0); opacity: 1; }
}

/* Stagger the 8 shapes (cascade order from logo.jsx) */
.nm-mark .nm-shape:nth-child(1) { animation-delay:    0ms; }  /* s0 pink top */
.nm-mark .nm-shape:nth-child(2) { animation-delay:   75ms; }  /* t0 teal tri */
.nm-mark .nm-shape:nth-child(3) { animation-delay:  150ms; }  /* s1 pink */
.nm-mark .nm-shape:nth-child(4) { animation-delay:  225ms; }  /* s2 orange */
.nm-mark .nm-shape:nth-child(5) { animation-delay:  300ms; }  /* s3 teal */
.nm-mark .nm-shape:nth-child(6) { animation-delay:  375ms; }  /* t1 yellow tri */
.nm-mark .nm-shape:nth-child(7) { animation-delay:  450ms; }  /* t2 orange tri */
.nm-mark .nm-shape:nth-child(8) { animation-delay:  525ms; }  /* s4 yellow */

/* ============================================================
   CE App spectrum ring — rotating SVG arc
   ============================================================ */
.ce-ring {
  display: block;
  transform-origin: center;
}
.ce-ring .ce-ring-inner {
  transform-origin: center;
  animation: ce-spin 24s linear infinite;
  opacity: 0;
  animation: ce-spin 24s linear infinite,
             ce-fadein 800ms 200ms var(--ease-out-soft) forwards;
}
@keyframes ce-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes ce-fadein {
  to { opacity: 1; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .nm-shape { transform: translate(0,0) !important; }
}
