/* ============================================================
   MEREBASE — SHARED STYLESHEET
   All common styles used across the public website.
   Page-specific styles remain in each HTML file's <style> block.
   ============================================================ */


/* === VARIABLES === */

:root {
  /* Colours */
  --carbon: #0C0A08;
  --white: #FAF7F2;
  --stone: #F5EFE4;
  --stone-deep: #EFE6D4;
  --card: #FFFFFF;
  --ink: #0C0A08;
  --ink-muted: #5C5248;
  --ink-subtle: #807667;
  --amber: #F59E0B;
  --amber-dark: #D97706;
  --amber-text: #B45309;
  --muted: rgba(250, 247, 242, 0.55);
  --border: rgba(250, 247, 242, 0.07);
  --border-light: rgba(12, 10, 8, 0.08);

  /* Border radii */
  --r: 3px;
  --r-dot: 16px;
  --r-dot-lg: 22px;
  --rc: 3px 3px 16px 3px;
  --rc-lg: 3px 3px 22px 3px;
}


/* === RESET === */

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


/* === BASE === */

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--stone);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}


/* === TOP BAR === */

.top-bar {
  background: var(--carbon);
  color: rgba(250, 247, 242, 0.6);
  text-align: center;
  padding: 0.6rem 1rem;
  font-size: 0.82rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(217, 119, 6, 0.2);
}

.top-bar strong {
  color: #F59E0B;
  font-weight: 700;
}

.top-bar a {
  color: #F59E0B;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
  white-space: nowrap;
}


/* === NAV === */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 10, 8, 0.92);
  backdrop-filter: blur(20px);
  transition: box-shadow 0.3s ease;
}

.nav-inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #FAF7F2;
  text-decoration: none;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.nav-logo span {
  color: #F59E0B;
}

.nav.is-floating {
  box-shadow:
    0 0 0 1px rgba(217, 119, 6, 0.18),
    0 8px 40px rgba(0, 0, 0, 0.25),
    0 2px 16px rgba(217, 119, 6, 0.08);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  color: rgba(250, 247, 242, 0.55);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
  white-space: nowrap;
}

.nav-links a:hover {
  color: #FAF7F2;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  background: #D97706;
  color: #0C0A08 !important;
  padding: 0.45rem 1rem;
  border-radius: var(--r);
  font-weight: 700 !important;
  font-size: 0.85rem !important;
}

.nav-cta:hover {
  background: #F59E0B !important;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #FAF7F2;
  border-radius: 2px;
  transition: all 0.2s;
}


/* === GRAIN TEXTURE === */
/* Shared SVG fractal noise applied as ::after on flat sections */

.footer,
.hero-stats-band,
.proof-band,
.register-section {
  position: relative;
}

/* Dark sections — visible grain */
.footer::after,
.hero-stats-band::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.09'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* Light sections — soft grain */
.proof-band::after,
.register-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* === FOOTER === */

.footer {
  border-top: 1px solid rgba(250, 247, 242, 0.07);
  padding: 3rem 0 2rem;
  background: #0C0A08;
  color: #FAF7F2;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("images/workflow-bg.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  mix-blend-mode: screen;
  opacity: 0.10;
  filter: grayscale(0.6) sepia(0.5) hue-rotate(340deg);
  pointer-events: none;
  z-index: 0;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  position: relative;
  z-index: 1;
}

.footer-logo {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: #FAF7F2;
  text-decoration: none;
  letter-spacing: -0.03em;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.footer-logo span {
  color: #F59E0B;
}

.footer-brand p {
  font-size: 0.85rem;
  color: rgba(250, 247, 242, 0.4);
  line-height: 1.6;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(250, 247, 242, 0.3);
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-col ul li a {
  font-size: 0.875rem;
  color: rgba(250, 247, 242, 0.5);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-col ul li a:hover {
  color: #FAF7F2;
}

.footer-disclaimer {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 1rem auto 0;
  padding: 0 2rem 1.5rem;
  font-size: 0.7rem;
  color: rgba(250, 247, 242, 0.18);
  line-height: 1.5;
}

.footer-bottom {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 2.5rem auto 0;
  padding: 1.5rem 2rem 0;
  border-top: 1px solid rgba(250, 247, 242, 0.07);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(250, 247, 242, 0.3);
}

.footer-bottom a {
  color: rgba(250, 247, 242, 0.45);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: #FAF7F2;
}


/* === BUTTONS === */

.btn-primary {
  background: #D97706;
  color: #0C0A08;
  font-family: 'DM Sans', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  padding: 0.9rem 2rem;
  border-radius: var(--r);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.15s, transform 0.15s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: #F59E0B;
  transform: translateY(-1px);
}

.btn-ghost {
  background: #0C0A08;
  color: rgba(250, 247, 242, 0.5);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.9rem 2rem;
  border-radius: var(--r);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(250, 237, 215, 0.1);
  transition: border-color 0.15s, color 0.15s;
}

.btn-ghost:hover {
  border-color: rgba(217, 119, 6, 0.4);
  color: #FAF7F2;
}


/* === SECTION === */

.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-text);
  margin-bottom: 0.8rem;
}

.section-h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(1.7rem, 3.8vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 0.9rem;
}

.section-h2 em {
  font-style: normal;
  color: var(--amber-text);
}

.section-sub {
  font-size: 1rem;
  color: var(--ink-muted);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}


/* === PROOF BAND === */

.proof-band {
  background: var(--stone-deep);
  padding: 3.5rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.proof-inner {
  max-width: 580px;
  margin: 0 auto;
}

.proof-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-text);
  margin-bottom: 1.25rem;
  opacity: 0.7;
}

.proof-example {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.55;
  font-style: italic;
  margin-bottom: 1rem;
}

.proof-meta {
  font-size: 0.82rem;
  color: var(--ink-subtle);
}

.proof-meta span {
  color: var(--amber-text);
  font-weight: 700;
}


/* === REGISTER / FORM SECTION === */

.register-section {
  background: var(--stone);
  padding: 2rem 1.5rem 5rem;
}

.register-inner {
  max-width: 620px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--rc-lg);
  box-shadow:
    0 1px 2px rgba(12, 10, 8, 0.04),
    0 20px 60px rgba(12, 10, 8, 0.08);
  padding: 3.25rem 2.5rem;
}


/* === FORM === */

.form {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.form input,
.form textarea,
.form select {
  width: 100%;
  background: var(--stone);
  border: 1px solid var(--border-light);
  border-radius: 3px;
  padding: 0.82rem 1rem;
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.93rem;
  transition: border-color 0.15s, background 0.15s;
  outline: none;
}

.form input::placeholder,
.form textarea::placeholder {
  color: rgba(12, 10, 8, 0.35);
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  border-color: var(--amber-dark);
  background: #FFFFFF;
}

.form select option {
  background: #FFFFFF;
  color: var(--ink);
}

.form textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.6;
}

.form-note {
  font-size: 0.72rem;
  color: var(--ink-subtle);
  text-align: center;
  margin-top: 0.65rem;
}

.form-capacity {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--amber-text);
  text-align: center;
  margin-top: 0.85rem;
}


/* === PROMISE BOX === */

.promise {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: rgba(217, 119, 6, 0.07);
  border: 1px solid rgba(217, 119, 6, 0.22);
  border-radius: var(--rc);
  padding: 1rem 1.2rem;
  margin: 0 0 1.5rem;
  text-align: left;
}

.promise-icon {
  font-size: 1.05rem;
  line-height: 1.4;
  flex-shrink: 0;
}

.promise-body {
  font-size: 0.85rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

.promise-body strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.2rem;
  font-size: 0.9rem;
}


/* === SCOPE LINE === */

.scope-line {
  font-size: 0.82rem;
  color: var(--ink-subtle);
  text-align: center;
  margin-top: 1.5rem;
  line-height: 1.6;
}

.scope-line a {
  color: var(--amber-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
}


/* === FADE-UP ANIMATION === */

.fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: none;
}


/* === KEYFRAMES === */

@keyframes heroIn {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}


/* === LEGAL PAGE SHARED STYLES === */
/* Used by privacy.html, terms.html, refund-policy.html */

.page-hero {
  padding: 4rem 2rem 3rem;
  border-bottom: 1px solid rgba(12, 10, 8, 0.1);
  background: #F5EFE4;
}

.page-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.page-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber);
  margin-bottom: 0.75rem;
}

.page-hero h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: #0C0A08;
  margin-bottom: 0.75rem;
}

.page-hero p {
  color: #5C5248;
  font-size: 0.95rem;
}

.page-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 4rem;
}

.toc {
  position: sticky;
  top: 80px;
  align-self: start;
}

.toc h4 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #807667;
  margin-bottom: 1rem;
}

.toc ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.toc ul li a {
  font-size: 0.82rem;
  color: #5C5248;
  text-decoration: none;
  transition: color 0.15s;
}

.toc ul li a:hover {
  color: #0C0A08;
}

.prose section {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(12, 10, 8, 0.1);
}

.prose section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.prose h2 {
  font-size: 1.25rem;
  color: #0C0A08;
  margin-bottom: 1rem;
}

.prose h3 {
  font-size: 1rem;
  color: #0C0A08;
  margin-bottom: 0.5rem;
  margin-top: 1.5rem;
  font-weight: 700;
}

.prose p {
  font-size: 0.925rem;
  color: #5C5248;
  margin-bottom: 0.85rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose ul,
.prose ol {
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.prose li {
  font-size: 0.925rem;
  color: #5C5248;
}

.prose strong {
  color: #0C0A08;
  font-weight: 700;
}

.prose a {
  color: #B45309;
}

.notice-box {
  background: rgba(217, 119, 6, 0.08);
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: var(--rc);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.notice-box p {
  color: #5C5248;
  font-size: 0.875rem;
  margin: 0;
}


/* === RESPONSIVE === */

@media (max-width: 1024px) {
  .nav-inner,
  .footer-inner,
  .footer-bottom {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (max-width: 860px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .register-inner {
    padding: 2.25rem 1.5rem;
  }

  /* Legal pages */
  .page-body {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .toc {
    display: none;
  }

  /* Nav mobile */
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(12, 10, 8, 0.98);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 2rem 1.5rem;
    gap: 0;
    border-bottom: 1px solid rgba(250, 247, 242, 0.07);
    z-index: 99;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    display: block;
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(250, 247, 242, 0.05);
    color: rgba(250, 247, 242, 0.7);
  }

  .nav-links li:last-child a {
    border-bottom: none;
    margin-top: 0.5rem;
    text-align: center;
  }

  .nav-hamburger {
    display: flex;
  }
}

@media (max-width: 480px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .btn-primary,
  .btn-ghost {
    text-align: center;
    justify-content: center;
  }
}
