/* =========================================================
   Nico Hanafi — design tokens + base styles
   Personal brand site, wealth/investment advisory.
   Palette: sky blue main, navy + teal + beige + white accents.
   ========================================================= */

:root {
  --ink: #16273D;        /* navy — headings, primary text, ~15:1 on white */
  --ink-soft: #3d4d5f;
  --grey-600: #64707c;
  --grey-300: #d7dfe5;
  --paper: #ffffff;

  --sky: #C8D9E6;         /* main brand colour — section backgrounds, fills */
  --sky-deep: #a9c2d4;    /* border/hover tint of sky */
  --beige: #F3E9D8;       /* alternate section background */
  --teal: #2B6560;        /* accent — links, buttons; ~4.6:1 on sky, 6.7:1 on white */
  --teal-dark: #204b47;   /* hover/pressed */

  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

  --container: 1160px;
  --radius: 16px;
  --radius-sm: 10px;

  --shadow-1: 0 1px 2px rgba(22, 39, 61, 0.06), 0 10px 28px rgba(22, 39, 61, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.js .reveal { opacity: 0; transform: translateY(22px); }
html.js .reveal.is-in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s ease; }

html.js .stagger > * { opacity: 0; transform: translateY(18px); }
html.js .stagger.is-in > * { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }
html.js .stagger.is-in > *:nth-child(2) { transition-delay: .08s; }
html.js .stagger.is-in > *:nth-child(3) { transition-delay: .16s; }
html.js .stagger.is-in > *:nth-child(4) { transition-delay: .24s; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  color: var(--ink);
}
h1 { font-size: clamp(2.2rem, 4.2vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; color: var(--ink-soft); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }

.eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 0.9rem;
}

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-body); font-weight: 600; font-size: 0.94rem;
  padding: 0.85rem 1.5rem; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--sky); color: var(--ink); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--grey-300); }
.btn-outline:hover { background: var(--sky); border-color: var(--sky-deep); color: var(--ink); }
.btn-secondary { background: var(--sky); color: var(--ink); }
.btn-secondary:hover { background: var(--beige); color: #252525; }

/* -------- Header -------- */
.site-header { position: sticky; top: 0; z-index: 40; }
.header-bg {
  position: absolute; inset: 0; z-index: -1;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.scrolled .header-bg { border-color: var(--grey-300); box-shadow: 0 1px 0 rgba(22,39,61,0.03); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem; max-width: var(--container); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--ink); }
.brand img { width: 48px; height: 48px; }
.brand-name { font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; line-height: 1.1; display: block; }
.brand-sub { font-size: 0.72rem; color: var(--grey-600); letter-spacing: 0.06em; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a { text-decoration: none; font-size: 0.95rem; font-weight: 500; color: var(--ink-soft); transition: color .15s ease; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--teal-dark); }
.nav .btn { margin-left: 0.5rem; }
.nav a.btn-primary { color: #fff; }
.nav a.btn-primary:hover { color: var(--ink); }

.burger {
  display: none; background: none; border: none; cursor: pointer;
  position: relative; z-index: 60;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  min-width: 44px; min-height: 44px;
}
.burger span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 0; transition: transform .2s ease, opacity .2s ease; }
.burger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-active span:nth-child(2) { opacity: 0; }
.burger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-scrim {
  position: fixed; inset: 0; background: rgba(22,39,61,0.4);
  opacity: 0; pointer-events: none; transition: opacity .3s ease; z-index: 45;
}

@media (max-width: 860px) {
  .nav { position: fixed; inset: 0 0 0 auto; width: min(320px, 82vw); background: var(--paper); flex-direction: column;
         justify-content: center; align-items: flex-start; padding: 2rem; gap: 1.6rem;
         transform: translateX(100%); transition: transform .3s ease; border-left: 1px solid var(--grey-300);
         z-index: 50; }
  .nav.open { transform: translateX(0); }
  .nav-scrim.is-visible { opacity: 1; pointer-events: auto; }
  .nav a { font-size: 1.35rem; }
  .burger { display: flex; }
  body.nav-mobile-open { overflow: hidden; }
}

/* -------- Hero -------- */
.hero { position: relative; padding: 4.5rem 0 5rem; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center; }
.hero-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); aspect-ratio: 4 / 3; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-lede { font-size: 1.12rem; max-width: 48ch; }
.hero-copy .hero-lede { max-width: 85ch; margin-left: auto; margin-right: auto; font-size: 1rem; }
.cta-row { display: flex; gap: 0.9rem; flex-wrap: wrap; }

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

/* -------- Hero slider (homepage banner) -------- */
.hero-slider { position: relative; height: min(620px, 82vh); min-height: 460px; overflow: hidden; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.hero-slide.is-active { opacity: 1; z-index: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22,39,61,0.62) 0%, rgba(22,39,61,0.42) 55%, rgba(22,39,61,0.66) 100%);
}

.hero-slider-overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 2rem; color: #fff;
  transition: opacity .3s ease;
}
.hero-slider-overlay.is-hidden { opacity: 0; pointer-events: none; }
.hero-slider-logo { width: 56px; height: 56px; margin-bottom: 1.1rem; border-radius: 12px; }
.hero-slider-overlay h1 { color: #fff; max-width: 46rem; }
.hero-slider-overlay .hero-lede { color: rgba(255,255,255,0.86); max-width: 46ch; }
.hero-slider-btn-outline { border-color: rgba(255,255,255,0.55); color: #fff; }
.hero-slider-btn-outline:hover { background: var(--sky); border-color: var(--sky); color: var(--ink); }

.hero-slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.45);
  color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; backdrop-filter: blur(4px); transition: background .15s ease;
}
.hero-slider-arrow:hover { background: rgba(255,255,255,0.28); }
.hero-slider-arrow.prev { left: 1.25rem; }
.hero-slider-arrow.next { right: 1.25rem; }

.hero-slider-dots { position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 0.6rem; }
.hero-slider-dots .dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.45); border: none; padding: 0; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.hero-slider-dots .dot.is-active { background: #fff; transform: scale(1.2); }

@media (max-width: 640px) {
  .hero-slider-arrow { width: 36px; height: 36px; }
  /* Fixed vh-capped height can't fit a 3-line headline + full lede on
     narrow screens, so the overlay overflows the container and collides
     with the dots. Let the overlay flow in-document on mobile instead —
     the container's height becomes the overlay's real content height,
     with enough bottom padding reserved that the dots never touch it. */
  .hero-slider { height: auto; min-height: 0; }
  .hero-slider-overlay { position: relative; padding: 5.5rem 1.25rem 4.5rem; }
  .hero-slider-dots { bottom: 1.1rem; }
  /* Arrows pinned at top:50% would sit on top of the now much-taller
     centered paragraph text. Anchor them to the bottom edge instead,
     alongside the dots, out of the way of any text content. */
  .hero-slider-arrow { top: auto; bottom: 0.85rem; transform: none; }
}

/* -------- Sections -------- */
section { padding: 5rem 0; }
.section-head { max-width: 640px; margin-bottom: 3rem; }
.section-alt { background: var(--sky); }
.section-beige { background: var(--beige); }
.strategy-section .section-head { margin-bottom: 0; }
.strategy-section .section-head p { margin-bottom: 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }
.grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (max-width: 960px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .grid-4 { grid-template-columns: 1fr; } }

.card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); display: flex; flex-direction: column; }
.card-body { padding: 1.6rem 1.7rem 1.9rem; }
.card h3 { margin-bottom: 0.5rem; }
.card p { font-size: 0.95rem; margin-bottom: 0; }

.section-cta { display: flex; justify-content: center; margin-top: 2.75rem; }

/* -------- YouTube preview -------- */
.youtube-preview { width: 100%; }
.youtube-facade {
  position: relative; aspect-ratio: 16/9; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-1); background: var(--ink);
  border: none; padding: 0; width: 100%; cursor: pointer;
}
.youtube-facade img { width: 100%; height: 100%; object-fit: cover; opacity: 0.82; }
.youtube-facade iframe { width: 100%; height: 100%; border: 0; }
.youtube-facade-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(22,39,61,0.15), rgba(22,39,61,0.55));
}
.youtube-facade-play span {
  width: 66px; height: 66px; border-radius: 50%; background: #FF0000;
  display: flex; align-items: center; justify-content: center; transition: transform .2s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.youtube-facade:hover .youtube-facade-play span { transform: scale(1.07); }
.youtube-facade-play svg { width: 24px; height: 24px; fill: #fff; margin-left: 3px; }
.youtube-facade-badge {
  position: absolute; top: 1rem; left: 1rem; z-index: 2;
  display: flex; align-items: center; gap: 0.6rem;
  background: rgba(22,39,61,0.55); backdrop-filter: blur(4px);
  padding: 0.4rem 0.9rem 0.4rem 0.4rem; border-radius: 999px;
}
.youtube-facade-badge img { width: 28px; height: 28px; border-radius: 50%; opacity: 1; }
.youtube-facade-badge span { color: #fff; font-size: 0.82rem; font-weight: 600; }
.youtube-facade-watch {
  position: absolute; bottom: 1rem; right: 1rem; z-index: 2;
  background: rgba(255,255,255,0.94); color: var(--ink);
  font-size: 0.78rem; font-weight: 600; padding: 0.4rem 0.9rem; border-radius: 999px;
}
.youtube-channel-row { display: flex; align-items: center; justify-content: center; gap: 0.9rem; margin-top: 1.5rem; flex-wrap: wrap; text-align: center; }

/* -------- Watch grid (placeholder, pending real videos) -------- */
.watch-card { position: relative; aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); background: var(--ink); }
.watch-card img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.watch-card-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem;
  background: linear-gradient(180deg, rgba(22,39,61,0.35), rgba(22,39,61,0.6)); color: #fff; text-align: center; padding: 1rem;
}
.watch-card-overlay span { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.85; }
.watch-card-overlay .play-ring { width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.7); display: flex; align-items: center; justify-content: center; }
.watch-card-overlay svg { width: 16px; height: 16px; fill: #fff; margin-left: 2px; }

/* -------- Split -------- */
.split { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 3rem; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); aspect-ratio: 4/5; }
.split-media img { width: 100%; height: 100%; object-fit: cover; }

/* -------- Profile card (People page) -------- */
.profile-card { display: grid; grid-template-columns: 0.6fr 1.4fr; gap: 2.5rem; align-items: start;
  background: #fff; border-radius: var(--radius); padding: 2.5rem; box-shadow: var(--shadow-1); }
.profile-card.reverse { grid-template-columns: 1.4fr 0.6fr; }
.profile-card.enlarged { grid-template-columns: 1fr 1.3fr; }
@media (max-width: 860px) { .profile-card, .profile-card.enlarged { grid-template-columns: 1fr; } }
.profile-media { border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4/5; }
.profile-media img { width: 100%; height: 100%; object-fit: cover; }
.profile-note { font-size: 0.8rem; color: var(--grey-600); margin-top: 0.6rem; font-style: italic; }

/* -------- Values / list -------- */
.value-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.value-list li { display: flex; gap: 1rem; align-items: flex-start; }
.value-list .num { font-family: var(--font-display); font-size: 1.3rem; color: var(--teal-dark); flex-shrink: 0; width: 2.2rem; }

/* -------- Newsletter / contact panel -------- */
.panel {
  background: var(--ink); color: var(--sky);
  border-radius: 26px; padding: 3rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center;
}
.panel h2, .panel p { color: var(--sky); }
.panel p { opacity: 0.82; }
@media (max-width: 860px) { .panel { grid-template-columns: 1fr; padding: 2rem; } }
.panel--form-only { grid-template-columns: 1fr; }
.panel--form-only form { width: 100%; }
.consult-grid { display: grid; grid-template-columns: 1fr 1.4fr; grid-template-areas: "fields message" "send message"; grid-template-rows: auto 1fr; column-gap: 2.5rem; align-items: start; }
.consult-fields { grid-area: fields; }
.consult-message { grid-area: message; display: flex; flex-direction: column; align-self: stretch; margin-bottom: 0; }
.consult-message textarea { flex: 1; min-height: 14rem; }
.consult-send { grid-area: send; align-self: end; }
@media (max-width: 860px) {
  .consult-grid { grid-template-columns: 1fr; grid-template-areas: "fields" "message" "send"; grid-template-rows: auto; }
  .consult-message { margin-bottom: 1rem; }
  .consult-message textarea { min-height: 9rem; }
}

.form-field { margin-bottom: 1rem; }
.form-field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.35rem; }
.form-field input, .form-field textarea {
  width: 100%; padding: 0.75rem 0.9rem; border-radius: var(--radius-sm);
  border: 1px solid rgba(200,217,230,0.3); background: rgba(200,217,230,0.08);
  color: var(--sky); font-family: var(--font-body); font-size: 0.95rem;
}
.form-field input::placeholder, .form-field textarea::placeholder { color: rgba(200,217,230,0.55); }
.form-field textarea { resize: vertical; }
.form-note { font-size: 0.78rem; opacity: 0.65; margin-top: 0.6rem; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { display: none; padding: 0.75rem 1rem; border-radius: var(--radius-sm); font-size: 0.88rem; margin-bottom: 1rem; }
.form-status.is-visible { display: block; }
.form-status.is-success { background: rgba(43,101,96,0.18); color: #fff; border: 1px solid rgba(43,101,96,0.5); }
.form-status.is-error { background: rgba(180,60,60,0.18); color: #fff; border: 1px solid rgba(180,60,60,0.5); }

/* -------- Footer -------- */
.site-footer { border-top: 1px solid var(--grey-300); padding: 2rem 0; }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; align-items: center; }
.footer-links { display: flex; gap: 1.4rem; list-style: none; padding: 0; margin: 0; font-size: 0.9rem; }
.footer-links a { text-decoration: none; color: var(--ink-soft); }
.footer-links a:hover { color: var(--teal-dark); }
.footer-bottom { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--grey-300); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; font-size: 0.8rem; color: var(--grey-600); }

.footer-linebreak { display: none; }
@media (max-width: 480px) {
  .footer-linebreak { display: block; }
}

/* -------- Skip link / a11y -------- */
.skip-link { position: absolute; left: -999px; top: auto; background: var(--ink); color: #fff; padding: 0.7rem 1.2rem; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
  html.js .reveal, html.js .stagger > * { opacity: 1; transform: none; }
  * { scroll-behavior: auto !important; }
}
