/* ============================================
   MADJOY — Design System
   Cyan / Cream / Black — classy, modern, editorial
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --cream: #f7f3ea;
  --cream-deep: #efe8d8;
  --black: #0b0d0d;
  --black-soft: #14171a;
  --cyan: #00c2cb;
  --cyan-deep: #009aa3;
  --cyan-glow: rgba(0, 194, 203, 0.18);
  --ink: #12141a;
  --ink-60: rgba(18, 20, 26, 0.62);
  --line: rgba(18, 20, 26, 0.12);
  --white: #ffffff;

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max: 1240px;
  --pad: clamp(24px, 5vw, 72px);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin: 0 0 0.5em;
  color: var(--black);
}

p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan-deep);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--cyan);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--pad);
  background: rgba(247, 243, 234, 0.78);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease), background .4s var(--ease), padding .3s var(--ease);
}
.nav.scrolled {
  border-bottom-color: var(--line);
  padding-top: 14px;
  padding-bottom: 14px;
}
.nav-logo {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--black);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.nav-logo span { color: var(--cyan-deep); font-style: italic; }
.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  padding-bottom: 4px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--cyan-deep);
  transition: width .35s var(--ease);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--cyan-deep); }

.nav-cta {
  border: 1px solid var(--black);
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
  white-space: nowrap;
}
.nav-cta:hover {
  background: var(--black);
  color: var(--cream);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px; height: 1.5px;
  background: var(--black);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transform: translateY(-100%);
  transition: transform .5s var(--ease);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a {
  font-family: var(--serif);
  font-size: 32px;
  color: var(--cream);
}
.mobile-menu a:hover { color: var(--cyan); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .35s var(--ease);
}
.btn-primary {
  background: var(--black);
  color: var(--cream);
}
.btn-primary:hover {
  background: var(--cyan-deep);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px var(--cyan-glow);
}
.btn-outline {
  border-color: var(--black);
  color: var(--black);
}
.btn-outline:hover {
  border-color: var(--cyan-deep);
  color: var(--cyan-deep);
  transform: translateY(-2px);
}
.btn-light {
  border-color: rgba(247,243,234,0.4);
  color: var(--cream);
}
.btn-light:hover {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--black);
  transform: translateY(-2px);
}
.btn svg { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translate(3px,-3px); }

/* ---------- Reveal animations ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
[data-reveal="scale"] { transform: scale(0.92); }
[data-reveal="scale"].is-visible { transform: scale(1); }
[data-reveal="left"] { transform: translateX(-48px); }
[data-reveal="left"].is-visible { transform: translateX(0); }
[data-reveal="right"] { transform: translateX(48px); }
[data-reveal="right"].is-visible { transform: translateX(0); }

[data-reveal-group] > * { transition-delay: calc(var(--i, 0) * 90ms); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 110px;
  overflow: hidden;
  background: var(--cream);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--cyan) 0%, transparent 70%);
  opacity: 0.35;
  filter: blur(40px);
  will-change: transform;
}
.hero-orb.one { width: 620px; height: 620px; top: -220px; right: -160px; }
.hero-orb.two { width: 360px; height: 360px; bottom: -120px; left: -100px; opacity: 0.22; }
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 90%);
  opacity: 0.5;
}
.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
}
.hero h1 {
  font-size: clamp(44px, 7vw, 96px);
  max-width: 15ch;
}
.hero h1 em {
  font-style: italic;
  color: var(--cyan-deep);
}
.hero-sub {
  font-size: clamp(17px, 2vw, 21px);
  color: var(--ink-60);
  max-width: 52ch;
  margin-top: 22px;
}
.hero-actions {
  display: flex;
  gap: 18px;
  margin-top: 44px;
  flex-wrap: wrap;
}
.hero-meta {
  display: flex;
  gap: 48px;
  margin-top: 90px;
  flex-wrap: wrap;
}
.hero-meta div { display: flex; flex-direction: column; gap: 6px; }
.hero-meta .num { font-family: var(--serif); font-size: 34px; color: var(--black); }
.hero-meta .label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-60); }

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: var(--pad);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-60);
}
.scroll-cue .line {
  width: 1px; height: 44px;
  background: linear-gradient(var(--ink-60), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-cue .line::after {
  content: '';
  position: absolute;
  top: -100%; left: 0;
  width: 100%; height: 100%;
  background: var(--cyan);
  animation: scrollDrip 2.2s var(--ease) infinite;
}
@keyframes scrollDrip {
  0% { top: -100%; }
  60% { top: 100%; }
  100% { top: 100%; }
}

/* ---------- Section basics ---------- */
section { position: relative; }
.section {
  padding: clamp(80px, 12vw, 160px) 0;
}
.section-tight { padding: clamp(60px, 8vw, 100px) 0; }
.section-head {
  max-width: 720px;
  margin-bottom: 64px;
}
.section-head h2 {
  font-size: clamp(32px, 4.2vw, 56px);
}
.section-head p {
  font-size: 18px;
  color: var(--ink-60);
  margin-top: 18px;
}
.dark { background: var(--black); color: var(--cream); }
.dark h1, .dark h2, .dark h3, .dark h4 { color: var(--cream); }
.dark .ink-60, .dark p { color: rgba(247,243,234,0.66); }
.dark .line-el { background: rgba(247,243,234,0.14); }

/* ---------- Practice split (home) ---------- */
.practices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
}
.practice-card {
  background: var(--cream);
  padding: clamp(36px, 4vw, 56px);
  position: relative;
  transition: background .4s var(--ease);
}
.practice-card:hover { background: var(--white); }
.practice-tag {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan-deep);
  font-weight: 600;
  margin-bottom: 20px;
  display: block;
}
.practice-card h3 { font-size: clamp(26px, 3vw, 34px); }
.practice-card .role { color: var(--ink-60); margin-top: 4px; font-size: 14px; }
.practice-card ul {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.practice-card li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: var(--ink);
}
.practice-card li::before {
  content: '';
  width: 6px; height: 6px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--cyan);
  flex-shrink: 0;
}
.practice-link {
  margin-top: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
}
.practice-link svg { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.practice-card:hover .practice-link svg { transform: translateX(4px); }

/* ---------- Cards / work grid ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }

.work-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s var(--ease);
}
.work-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px -30px rgba(11,13,13,0.25);
  border-color: var(--cyan);
}
.work-index { font-family: var(--serif); font-size: 15px; color: var(--cyan-deep); margin-bottom: 22px; }
.work-card h3 { font-size: 22px; margin-bottom: 10px; }
.work-tag { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-60); margin-bottom: 8px; }
.work-card p { color: var(--ink-60); font-size: 15px; flex: 1; }
.work-result {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
}

/* ---------- Blog cards ---------- */
.blog-card {
  display: block;
  border-bottom: 1px solid var(--line);
  padding: 44px 0;
  transition: padding-left .4s var(--ease);
}
.blog-card:hover { padding-left: 14px; }
.blog-meta { display: flex; gap: 16px; align-items: center; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-60); margin-bottom: 14px; }
.blog-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); }
.blog-card h3 { font-size: clamp(24px, 3vw, 32px); transition: color .3s var(--ease); }
.blog-card:hover h3 { color: var(--cyan-deep); }
.blog-card p { color: var(--ink-60); max-width: 65ch; margin-top: 10px; }
.blog-read { margin-top: 16px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.blog-card-inner { display: flex; gap: 28px; align-items: flex-start; }
.blog-card-thumb {
  flex-shrink: 0;
  width: 180px;
  aspect-ratio: 1200 / 630;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.blog-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 640px) {
  .blog-card-inner { flex-direction: column; }
  .blog-card-thumb { width: 100%; }
}

/* ---------- Blog post cover image ---------- */
.post-cover {
  max-width: 900px;
  margin: 0 auto 20px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.post-cover img { width: 100%; height: auto; display: block; }

/* ---------- Logos / trust strip ---------- */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
  justify-content: space-between;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.trust-strip span {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--ink-60);
  opacity: 0.7;
  transition: opacity .3s var(--ease);
}
.trust-strip span:hover { opacity: 1; color: var(--cyan-deep); }

/* ---------- Stats band ---------- */
.stat-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
}
.stat-cell {
  background: var(--cream);
  padding: 40px 28px;
  text-align: center;
}
.stat-cell .num { font-family: var(--serif); font-size: clamp(32px,4vw,48px); color: var(--cyan-deep); }
.stat-cell .lbl { font-size: 13px; color: var(--ink-60); margin-top: 8px; }

/* ---------- Quote ---------- */
.pull-quote {
  font-family: var(--serif);
  font-size: clamp(26px, 3.4vw, 42px);
  font-style: italic;
  line-height: 1.35;
  max-width: 900px;
}
.pull-quote cite {
  display: block;
  margin-top: 28px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan-deep);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--black);
  color: var(--cream);
  padding: 90px 0 32px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(247,243,234,0.14);
}
.footer-brand { font-family: var(--serif); font-size: 30px; }
.footer-brand span { color: var(--cyan); font-style: italic; }
.footer p.ftag { color: rgba(247,243,234,0.6); margin-top: 16px; max-width: 32ch; }
.footer h5 { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(247,243,234,0.5); margin-bottom: 20px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.footer a { color: rgba(247,243,234,0.85); font-size: 14px; transition: color .3s var(--ease); }
.footer a:hover { color: var(--cyan); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 13px;
  color: rgba(247,243,234,0.45);
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  padding: 170px 0 80px;
  position: relative;
  overflow: hidden;
}
.page-hero .eyebrow { margin-bottom: 20px; }
.page-hero h1 { font-size: clamp(40px, 6vw, 72px); max-width: 18ch; }
.page-hero p.lead { font-size: 19px; color: var(--ink-60); max-width: 60ch; margin-top: 20px; }

/* ---------- Form ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-60); }
.field input, .field select, .field textarea {
  font-family: var(--sans);
  font-size: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  outline: none;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px var(--cyan-glow);
}
.field textarea { resize: vertical; min-height: 140px; }

/* ---------- Utility ---------- */
.center { text-align: center; margin-left: auto; margin-right: auto; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mt-64 { margin-top: 64px; }
.divider { height: 1px; background: var(--line); border: none; margin: 0; }
.cyan-text { color: var(--cyan-deep); }

/* ---------- Blog post ---------- */
.post-body {
  max-width: 720px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.8;
  color: var(--ink);
}
.post-body h2 { font-size: 30px; margin-top: 2em; }
.post-body h3 { font-size: 22px; margin-top: 1.6em; }
.post-body p { margin-bottom: 1.4em; }
.post-body blockquote {
  border-left: 3px solid var(--cyan);
  padding-left: 24px;
  margin: 2em 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--black);
}
.post-header { max-width: 720px; margin: 0 auto 50px; text-align: center; }
.post-header h1 { font-size: clamp(32px, 5vw, 52px); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .practices, .grid-3, .grid-2, .stat-band, .form-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .hero-meta { gap: 32px; }
}
@media (max-width: 640px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- WhatsApp floating button ---------- */
.whatsapp-float {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 900;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px -10px rgba(11,13,13,0.45);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.whatsapp-float svg { width: 30px; height: 30px; }
.whatsapp-float:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 20px 40px -10px rgba(11,13,13,0.5);
}
@media (max-width: 640px) {
  .whatsapp-float { right: 18px; bottom: 18px; width: 54px; height: 54px; }
  .whatsapp-float svg { width: 27px; height: 27px; }
}
