/* ============================================================
   ETX — Emara Tax Expert · Production site styles
   Warm sand/cream system · bold display type · responsive
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Instrument+Serif:ital@0;1&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Brand */
  --red:    #C8102E;
  --green:  #009739;
  --green-dk:#006B2B;
  --green-lt:#8FD6A6;
  --green-50:#F1FAF4;

  /* Sand / cream surfaces */
  --page:   #F5EEE1;
  --cream:  #FAF6EC;
  --paper:  #FFFFFF;
  --warm:   #F0E0C2;
  --warm-dk:#E8D2A6;
  --sand:   #C9A97E;
  --sand-dk:#8A6E3F;

  /* Ink */
  --ink:    #1B1E23;
  --ink-2:  #3D434C;
  --ink-sub:#767D87;
  --ink-faint:#A7ADB5;

  /* Type */
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --arabic: 'IBM Plex Sans Arabic', 'Inter', sans-serif;
  --display: 'Instrument Serif', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  --maxw: 1240px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--page);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01","cv11";
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }

.em { font-family: var(--display); font-style: italic; font-weight: 400; color: var(--green); letter-spacing: -0.02em; }
.mono { font-family: var(--mono); }
.tnum { font-variant-numeric: tabular-nums; font-feature-settings:"tnum","lnum"; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.section { padding: 96px 0; }
@media (max-width: 768px) { .section { padding: 64px 0; } }

/* ---------- Flag bar ---------- */
.flagbar { position: fixed; top: 0; left: 0; right: 0; height: 4px; display: flex; z-index: 100; }
.flagbar i { flex: 1; }
.flagbar i:nth-child(1){ background: var(--red); }
.flagbar i:nth-child(2){ background: var(--green); }
.flagbar i:nth-child(3){ background: #fff; }
.flagbar i:nth-child(4){ background: #0F1114; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 4px; z-index: 90;
  background: rgba(245,238,225,0.85);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 14px 32px; display: flex; align-items: center; gap: 20px; }
.logo { display: inline-flex; align-items: center; gap: 9px; }
.logo-img { height: 34px; width: auto; display: block; }
.footer .logo-img, .split .logo-img { height: 40px; }
@media (max-width: 560px) { .logo-img { height: 28px; } }
.logo-swatch { width: 32px; height: 32px; border-radius: 8px; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; flex-shrink: 0; }
.logo-swatch i:nth-child(1){ background: var(--red); }
.logo-swatch i:nth-child(2){ background: var(--green); }
.logo-swatch i:nth-child(3){ background: #fff; border: 1px solid #00000010; }
.logo-swatch i:nth-child(4){ background: #0F1114; }
.logo-word { font-weight: 800; font-size: 18px; letter-spacing: -0.025em; }
.logo-sub { font-size: 12px; color: var(--ink-sub); font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.nav-links a { font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap; transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); font-weight: 600; }
.nav-divider { width: 1px; height: 18px; background: rgba(0,0,0,0.1); }
.nav-toggle { display: none; background: none; border: none; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; transition: .3s; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; border: none; border-radius: 999px; font-weight: 700; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s, background .2s; white-space: nowrap; }
.btn:active { transform: scale(0.97); }
.btn-sm { padding: 9px 18px; font-size: 13px; }
.btn-md { padding: 13px 22px; font-size: 14px; }
.btn-lg { padding: 18px 28px; font-size: 15px; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #000; }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 12px 28px -8px rgba(0,151,57,0.45); }
.btn-green:hover { background: var(--green-dk); transform: translateY(-2px); box-shadow: 0 16px 34px -8px rgba(0,151,57,0.5); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--warm-dk); }
.btn-ghost:hover { background: var(--cream); }
.btn-ghost-dark { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.25); }
.btn-ghost-dark:hover { background: rgba(255,255,255,0.08); }

/* Glow ring on primary CTA */
.glow { position: relative; border-radius: 999px; }
.glow::before { content:''; position:absolute; inset:0; border-radius:999px; box-shadow: 0 0 0 0 rgba(0,151,57,0.4); animation: glow 2.4s ease-in-out infinite; pointer-events:none; }
@keyframes glow { 0%,100%{ box-shadow:0 0 0 0 rgba(0,151,57,0.4); } 50%{ box-shadow:0 0 0 14px rgba(0,151,57,0); } }

/* Eyebrow */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 13px 5px 10px; border-radius: 999px; border: 1px solid rgba(0,0,0,0.1); background: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.eyebrow.on-dark { border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.05); color: #fff; }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{ opacity:1; transform:scale(1);} 50%{opacity:.6; transform:scale(1.1);} }

/* Display headings */
.h-hero { font-weight: 800; letter-spacing: -0.045em; line-height: 0.92; color: var(--ink); }
.h-1 { font-size: clamp(48px, 8vw, 104px); font-weight: 800; letter-spacing: -0.045em; line-height: 0.94; }
.h-2 { font-size: clamp(36px, 5vw, 64px); font-weight: 800; letter-spacing: -0.035em; line-height: 0.98; }
.h-3 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.lead { font-size: clamp(16px, 2vw, 20px); color: var(--ink-2); line-height: 1.5; }

/* Em underline reveal */
.em-underline { position: relative; display: inline-block; }
.em-underline::after { content:''; position:absolute; left:0; right:0; bottom:0.07em; height:0.14em; background: rgba(0,151,57,0.22); z-index:-1; transform: scaleX(0); transform-origin: left; }
.reveal-on .em-underline::after { animation: underline 1.1s var(--ease) .5s forwards; }
@keyframes underline { to { transform: scaleX(1); } }

/* Cards */
.card { background: var(--paper); border: 1px solid var(--warm); border-radius: 18px; transition: transform .35s var(--ease), box-shadow .35s; }
.card-hover:hover { transform: translateY(-4px); box-shadow: 0 24px 48px -16px rgba(60,40,15,0.18); }
.card-r24 { border-radius: 24px; }

/* Module icon tile */
.icon-tile { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; transition: transform .4s var(--ease-spring); }
.card-hover:hover .icon-tile { transform: rotate(-6deg) scale(1.08); }

/* Footer */
.footer { background: var(--ink); color: rgba(255,255,255,0.55); font-size: 13px; padding: 56px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 24px; margin-bottom: 36px; }
.footer h4 { color: #fff; font-weight: 700; margin-bottom: 14px; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.footer li { margin-bottom: 8px; }
.footer a:hover { color: #fff; }
.footer-soc { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.footer-soc span { padding: 5px 11px; border: 1px solid rgba(255,255,255,0.15); border-radius: 6px; color: rgba(255,255,255,0.75); font-size: 11.5px; }
.footer-bottom { padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.08); display: flex; justify-content: space-between; font-size: 11.5px; gap: 16px; flex-wrap: wrap; }
.footer .logo-word { color: #fff; }

/* Marquee */
.marquee { padding: 28px 0; border-top: 1px solid var(--warm); border-bottom: 1px solid var(--warm); background: var(--cream); overflow: hidden; }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 30s linear infinite; }
.marquee-track span { font-size: 18px; font-weight: 700; letter-spacing: 0.08em; color: var(--ink-sub); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Orbs + float */
.orb { position: absolute; border-radius: 50%; pointer-events: none; filter: blur(40px); z-index: 0; }
.float { animation: float 6s ease-in-out infinite; }
.float-slow { animation: floatslow 8s ease-in-out infinite; }
@keyframes float { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-10px);} }
@keyframes floatslow { 0%,100%{transform:translateY(0) rotate(-1deg);} 50%{transform:translateY(-16px) rotate(-1deg);} }

/* Sparkles */
.spark { position: absolute; color: var(--green); animation: spark 2.4s ease-in-out infinite; }
.spark.s2 { animation-delay: .8s; color: var(--sand); }
.spark.s3 { animation-delay: 1.6s; }
@keyframes spark { 0%,100%{opacity:0; transform:scale(.5);} 50%{opacity:1; transform:scale(1.2);} }

/* Scroll reveal — only hidden once JS opts in (.js-reveal on <html>), so
   content is always visible without JS or if the observer never fires. */
.reveal { transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js-reveal .reveal:not(.in) { opacity: 0; transform: translateY(28px); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }
.reveal.d5 { transition-delay: .4s; }

/* Pills / badges */
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }

/* Live dot */
.live-dot { position: relative; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.live-dot::after { content:''; position:absolute; inset:-3px; border-radius:50%; border:1.5px solid currentColor; opacity:.6; animation: ring 2s ease-out infinite; }
@keyframes ring { 0%{transform:scale(.6); opacity:.55;} 100%{transform:scale(2.2); opacity:0;} }

/* Wave */
.wave { transform-origin: center; animation: wave 3s ease-in-out infinite; }
@keyframes wave { 0%,100%{transform:rotate(-3deg);} 50%{transform:rotate(3deg);} }

/* Mockup chrome (reused) */
.mock { background: #fff; border-radius: 18px; padding: 14px; border: 1px solid rgba(0,0,0,0.06); box-shadow: 0 30px 80px -20px rgba(60,40,15,0.25), 0 8px 24px -8px rgba(60,40,15,0.12); }
.mock-bar { display: flex; gap: 6px; align-items: center; padding: 2px 4px 12px; border-bottom: 1px solid rgba(0,0,0,0.05); margin-bottom: 12px; }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; }
.mock-url { flex: 1; height: 18px; background: #F4F5F7; border-radius: 6px; margin-left: 8px; display: flex; align-items: center; padding: 0 8px; font-size: 9px; color: #A7ADB5; font-family: var(--mono); }

/* Bars */
.bars { display: flex; align-items: flex-end; gap: 3px; }
.bars i { flex: 1; border-radius: 2px 2px 0 0; background: var(--green-lt); }

/* Grid helpers */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

/* Photo slot placeholder */
.photo { background: linear-gradient(135deg, var(--warm), var(--cream)); border: 1px dashed var(--warm-dk); border-radius: 20px; display: flex; align-items: center; justify-content: center; color: var(--sand-dk); font-size: 13px; font-weight: 500; text-align: center; padding: 20px; min-height: 200px; position: relative; overflow: hidden; }
.photo::after { content: '⤓ image'; position: absolute; bottom: 12px; right: 14px; font-size: 10px; color: var(--ink-faint); letter-spacing: 0.06em; text-transform: uppercase; }

/* Sign-up split */
.split { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-links { position: fixed; inset: 0 0 0 auto; width: min(80vw, 320px); flex-direction: column; align-items: flex-start; gap: 4px; background: var(--cream); padding: 80px 28px 28px; transform: translateX(100%); transition: transform .3s var(--ease); box-shadow: -12px 0 40px rgba(0,0,0,0.12); margin-left: 0; }
  .nav-links.open { transform: none; }
  .nav-links a { font-size: 16px; padding: 8px 0; }
  .nav-divider { display: none; }
  .nav-toggle { display: block; margin-left: auto; z-index: 95; }
  .nav-cta-desktop { display: none; }
  .g3, .g2 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; min-height: auto; }
  .split-aside { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .nav-inner { padding: 12px 20px; }
  .g4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hide-sm { display: none; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}


/* ---------- Long-form content (guides, legal, help) ---------- */
.prose { max-width: 760px; color: var(--ink-2); font-size: 16.5px; line-height: 1.7; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-size: clamp(26px,3.4vw,36px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; color: var(--ink); margin-top: 1.7em; }
.prose h3 { font-size: clamp(19px,2.3vw,23px); font-weight: 700; letter-spacing: -0.02em; color: var(--ink); margin-top: 1.4em; }
.prose h4 { font-size: 16.5px; font-weight: 700; color: var(--ink); margin-top: 1.2em; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose a { color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(0,151,57,0.3); }
.prose a:hover { text-decoration-color: var(--green); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-top: 0.45em; padding-left: 0.2em; }
.prose li::marker { color: var(--green); }
.prose blockquote { border-left: 3px solid var(--green); padding: 4px 0 4px 20px; color: var(--ink); font-style: italic; }
.prose hr { border: none; border-top: 1px solid var(--warm); margin: 2em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin-top: 1.2em; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--warm); vertical-align: top; }
.prose thead th { background: var(--cream); font-weight: 700; color: var(--ink); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.prose code { font-family: var(--mono); font-size: 0.9em; background: var(--cream); padding: 2px 6px; border-radius: 5px; }
