/* ============================================================
   azure IM — boutique investment management
   Palette: deep navy base · azure accent · warm off-white
   Type: Fraunces (display serif) · Hanken Grotesk (sans body)
   ============================================================ */

:root {
  --navy-900: #0c1830;
  --navy-800: #0f1d38;
  --navy-700: #16243f;
  --navy-600: #1d2e4d;
  --azure:    #4aa3d8;
  --azure-lt: #8fd0ee;
  --azure-dp: #2a7fb8;
  --cream:    #f4f1ea;
  --cream-2:  #efe9dd;
  --ink:      #14213b;
  --ink-soft: #51607b;
  --line:     rgba(20, 33, 59, 0.14);
  --line-d:   rgba(255, 255, 255, 0.12);

  --serif: "Fraunces", Georgia, serif;
  --sans:  "Hanken Grotesk", system-ui, sans-serif;

  --maxw: 1240px;
  --pad: clamp(1.4rem, 5vw, 6rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  font-size: clamp(1rem, 0.9rem + 0.3vw, 1.125rem);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
em { font-style: italic; }

::selection { background: var(--azure); color: #fff; }

/* grain overlay */
.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: 0.035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ───────────────── NAV ───────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(1rem, 2vw, 1.6rem) var(--pad);
  transition: padding 0.4s var(--ease), background 0.4s var(--ease),
              box-shadow 0.4s var(--ease);
}
.nav.scrolled {
  padding-top: 0.85rem; padding-bottom: 0.85rem;
  background: rgba(12, 24, 48, 0.78);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line-d);
}

.brand {
  font-family: var(--sans);
  font-weight: 600; font-size: 1.4rem; letter-spacing: -0.02em;
  color: #fff; display: inline-flex; align-items: baseline; gap: 0.28em;
  transition: opacity 0.3s;
}
.brand:hover { opacity: 0.8; }
.brand-mark--im {
  color: var(--azure-lt); font-weight: 600;
  letter-spacing: 0.04em; font-size: 0.95em;
}

.nav-links { display: flex; align-items: center; gap: clamp(1.4rem, 3vw, 2.6rem); }
.nav-links a {
  color: rgba(255, 255, 255, 0.82); font-size: 0.92rem; font-weight: 500;
  letter-spacing: 0.01em; position: relative; transition: color 0.3s;
}
.nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -5px; height: 1px; width: 0;
  background: var(--azure-lt); transition: width 0.35s var(--ease);
}
.nav-links a:not(.nav-cta):hover::after { width: 100%; }
.nav-links a:hover { color: #fff; }
.nav-cta {
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 0.5rem 1.1rem; border-radius: 100px;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.nav-cta:hover { background: var(--azure); border-color: var(--azure); color: #fff; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer;
  width: 30px; height: 22px; position: relative; }
.nav-toggle span {
  position: absolute; left: 0; height: 2px; width: 100%; background: #fff;
  transition: transform 0.35s var(--ease), opacity 0.3s;
}
.nav-toggle span:first-child { top: 4px; }
.nav-toggle span:last-child { bottom: 4px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-6px) rotate(-45deg); }

/* ───────────────── HERO ───────────────── */
.hero {
  position: relative; min-height: 100svh;
  background: var(--navy-800); color: #fff; overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: 100svh; align-items: stretch;
}
.hero-inner {
  position: relative; z-index: 2; align-self: center; min-width: 0;
  padding: 9rem var(--pad) 5rem;
  max-width: 720px; justify-self: end; width: 100%;
}

/* right-hand coastline / sea panel */
.hero-media { position: relative; overflow: hidden; min-height: 100svh; }
.hero-sea { position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(165deg, #2f9ac9 0%, #1b6f9e 38%, #134e78 64%, var(--navy-800) 100%); }
/* user's coastline photo (drop a file at assets/hero-coast.jpg to enable) */
.hero-photo {
  position: absolute; inset: 0; z-index: 1;
  background-image: url("assets/hero-coast.jpg");
  background-size: cover; background-position: center;
}
/* soft seam blending the panel into the navy text side */
.hero-media-edge {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, var(--navy-800) 0%, transparent 22%);
}

.hero-sea .wave {
  position: absolute; border-radius: 45% 55% 52% 48% / 55% 48% 52% 45%;
  filter: blur(40px); opacity: 0.55; will-change: transform;
}
.wave-1 {
  width: 95%; height: 65%; right: -14%; top: -12%;
  background: radial-gradient(circle at 40% 40%, var(--azure-lt), transparent 64%);
  animation: drift1 22s ease-in-out infinite;
}
.wave-2 {
  width: 85%; height: 62%; left: -16%; top: 18%;
  background: radial-gradient(circle at 50% 50%, var(--azure-dp), transparent 62%);
  opacity: 0.5; animation: drift2 28s ease-in-out infinite;
}

/* animated azure sea / coastline */
.sea {
  position: absolute; left: 0; right: 0; bottom: 0; height: 60vh; z-index: 1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 28%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 28%);
}
.sea-layer {
  position: absolute; bottom: 0; left: 0; width: 200%; height: 100%;
  background-repeat: repeat-x; background-position: 0 bottom;
  will-change: transform;
}
.sea-1 {
  height: 60%; opacity: 0.85;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,52 C150,96 360,8 600,46 C840,82 1040,18 1200,52 L1200,120 L0,120 Z' fill='%232a7fb8'/%3E%3C/svg%3E");
  background-size: 50% 100%;
  animation: swell 18s linear infinite;
}
.sea-2 {
  height: 44%; opacity: 0.7;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,60 C200,20 380,98 600,58 C820,20 1020,92 1200,56 L1200,120 L0,120 Z' fill='%234aa3d8'/%3E%3C/svg%3E");
  background-size: 50% 100%;
  animation: swell 12s linear infinite reverse;
}
.sea-3 {
  height: 30%; opacity: 0.6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,70 C160,40 360,100 600,72 C840,44 1040,100 1200,70 L1200,120 L0,120 Z' fill='%238fd0ee'/%3E%3C/svg%3E");
  background-size: 50% 100%;
  animation: swell 8s linear infinite;
}
.sea-foam {
  position: absolute; bottom: 0; left: 0; right: 0; height: 30%;
  background:
    radial-gradient(60% 80% at 20% 100%, rgba(143,208,238,0.45), transparent 70%),
    radial-gradient(50% 70% at 75% 100%, rgba(255,255,255,0.18), transparent 70%);
  filter: blur(6px);
}
@keyframes swell {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes drift1 {
  0%,100% { transform: translate(0,0) rotate(0deg); }
  50% { transform: translate(-4%, 5%) rotate(8deg); }
}
@keyframes drift2 {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(5%, -4%) scale(1.08); }
}

.hero-inner { position: relative; z-index: 2; max-width: var(--maxw); width: 100%;
  margin: 0 auto; }

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.28em; font-size: 0.72rem;
  font-weight: 500; color: var(--azure-lt); margin-bottom: 1.6rem;
}

.hero-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.6rem, 5.2vw, 5.6rem); line-height: 0.98;
  letter-spacing: -0.025em; margin-bottom: 1.8rem;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line em { color: var(--azure-lt); font-weight: 400; }
.hero-title [data-reveal-line] {
  display: block; transform: translateY(110%);
}

.hero-sub {
  font-size: clamp(1.05rem, 1.4vw, 1.3rem); max-width: 36ch;
  color: rgba(255, 255, 255, 0.78); font-weight: 300; line-height: 1.55;
  margin-bottom: 2.4rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--sans); font-weight: 500; font-size: 0.95rem;
  padding: 0.95rem 1.8rem; border-radius: 100px; cursor: pointer;
  border: 1px solid transparent; transition: all 0.35s var(--ease);
}
.btn-primary { background: var(--azure); color: #fff; }
.btn-primary:hover {
  background: var(--azure-lt); color: var(--navy-900);
  transform: translateY(-2px); box-shadow: 0 12px 30px -10px rgba(74, 163, 216, 0.6);
}
.btn-ghost { border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,0.06); transform: translateY(-2px); }

.scroll-cue {
  position: absolute; bottom: 2.2rem; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
  font-size: 0.68rem; letter-spacing: 0.25em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.scroll-line { width: 1px; height: 46px; background: rgba(255,255,255,0.3); position: relative; overflow: hidden; }
.scroll-line::after {
  content: ""; position: absolute; top: -50%; left: 0; width: 100%; height: 50%;
  background: var(--azure-lt); animation: scrolldown 2.2s var(--ease) infinite;
}
@keyframes scrolldown { 0% { top: -50%; } 100% { top: 100%; } }

/* ───────────────── SECTIONS ───────────────── */
.section { padding: clamp(5rem, 11vh, 9rem) var(--pad); max-width: var(--maxw);
  margin: 0 auto; }

.kicker {
  display: inline-block; text-transform: uppercase; letter-spacing: 0.24em;
  font-size: 0.72rem; font-weight: 600; color: var(--azure-dp);
  margin-bottom: 1.4rem; position: relative; padding-left: 2.6rem;
}
.kicker::before {
  content: ""; position: absolute; left: 0; top: 0.5em; width: 2rem; height: 1px;
  background: var(--azure-dp);
}

.section-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.9rem, 4vw, 3.2rem); line-height: 1.06;
  letter-spacing: -0.02em; max-width: 22ch;
}
.section-head--split { margin-bottom: clamp(2.5rem, 5vw, 4rem); }

/* WHO WE ARE */
.who-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.lede {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.5rem, 3vw, 2.5rem); line-height: 1.2;
  letter-spacing: -0.015em; color: var(--ink);
}
.lede::first-letter { color: var(--azure-dp); }
.who-body { display: flex; flex-direction: column; gap: 1.3rem; color: var(--ink-soft);
  padding-top: 0.6rem; }

/* STRATEGY PILLARS */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.pillar {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 2.2rem 2rem 2rem; position: relative; overflow: hidden;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s;
}
.pillar::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--azure), var(--azure-lt));
  transition: width 0.5s var(--ease);
}
.pillar:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px -28px rgba(16, 36, 63, 0.35);
  border-color: transparent;
}
.pillar:hover::before { width: 100%; }
.pillar-no {
  font-family: var(--serif); font-size: 0.95rem; color: var(--azure-dp);
  letter-spacing: 0.1em; display: block; margin-bottom: 1.6rem;
}
.pillar h3 {
  font-family: var(--serif); font-weight: 400; font-size: 1.5rem;
  line-height: 1.15; letter-spacing: -0.01em; margin-bottom: 0.9rem;
}
.pillar p { color: var(--ink-soft); font-size: 0.98rem; margin-bottom: 1.6rem; }
.pillar-tag {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em;
  font-weight: 600; color: var(--azure-dp);
  border: 1px solid var(--line); border-radius: 100px; padding: 0.35rem 0.85rem;
  display: inline-block;
}

/* APPROACH */
.approach { max-width: 1400px; }
.approach-grid {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.approach-visual { aspect-ratio: 4 / 5; }
.approach-panel {
  position: relative; width: 100%; height: 100%; border-radius: 20px; overflow: hidden;
  background:
    linear-gradient(155deg, var(--navy-700), var(--navy-900) 70%);
  display: flex; align-items: flex-end; padding: 2rem;
  box-shadow: 0 40px 80px -40px rgba(12, 24, 48, 0.6);
}
.panel-glow {
  position: absolute; width: 120%; height: 120%; left: -30%; top: -20%;
  background: radial-gradient(circle at 40% 40%, rgba(74,163,216,0.55), transparent 55%);
  animation: drift2 24s ease-in-out infinite; filter: blur(10px);
}
.panel-label {
  position: relative; z-index: 1; font-family: var(--sans); font-weight: 600;
  font-size: 1.6rem; color: #fff; letter-spacing: -0.02em;
}
.panel-label::after { content: ""; }
.approach-text { display: flex; flex-direction: column; gap: 1.3rem; }
.approach-text .section-title { margin-bottom: 0.5rem; }
.approach-text p { color: var(--ink-soft); max-width: 50ch; }

/* STATS */
.stats { max-width: var(--maxw); }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0;
}
.stat { display: flex; flex-direction: column; gap: 0.6rem; }
.stat-num {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.6rem, 5vw, 4.2rem); line-height: 1;
  letter-spacing: -0.02em; color: var(--ink);
}
.stat-label { font-size: 0.9rem; color: var(--ink-soft); max-width: 20ch; }
.stats-note { font-size: 0.78rem; color: var(--ink-soft); opacity: 0.7;
  margin-top: 1.4rem; font-style: italic; }

/* CONTACT */
.contact { max-width: 900px; text-align: center; }
.contact-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.02;
  letter-spacing: -0.025em; margin-bottom: 1.2rem;
}
.contact-sub { color: var(--ink-soft); max-width: 44ch; margin: 0 auto 2rem; }
.contact-mail {
  display: inline-block; font-family: var(--serif); font-size: clamp(1.3rem, 3vw, 2rem);
  color: var(--azure-dp); border-bottom: 1px solid var(--azure);
  padding-bottom: 4px; margin-bottom: 3.5rem; transition: color 0.3s, border-color 0.3s;
}
.contact-mail:hover { color: var(--navy-700); border-color: var(--navy-700); }

.contact-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem;
  text-align: left; margin-top: 1rem;
}
.field { position: relative; }
.field--full { grid-column: 1 / -1; }
.field input, .field textarea {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line);
  padding: 0.9rem 0 0.7rem; font-family: var(--sans); font-size: 1rem; color: var(--ink);
  resize: vertical; transition: border-color 0.3s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--azure); }
.field label {
  position: absolute; left: 0; top: 0.9rem; color: var(--ink-soft);
  pointer-events: none; transition: all 0.25s var(--ease); font-size: 1rem;
}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
  top: -0.6rem; font-size: 0.74rem; color: var(--azure-dp); letter-spacing: 0.04em;
}
.contact-form .btn { grid-column: 1 / -1; justify-self: start; margin-top: 0.6rem; }

/* ───────────────── FOOTER ───────────────── */
.footer {
  background: var(--navy-900); color: rgba(255,255,255,0.7);
  padding: clamp(3.5rem, 7vw, 5rem) var(--pad) 2.5rem;
}
.footer-top {
  max-width: var(--maxw); margin: 0 auto; display: flex;
  justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 2rem;
  padding-bottom: 3rem; border-bottom: 1px solid var(--line-d);
}
.brand--footer { font-size: 1.7rem; }
.footer-address { font-style: normal; line-height: 1.7; font-size: 0.95rem; }
.footer-bottom {
  max-width: var(--maxw); margin: 2rem auto 0; display: flex;
  justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-size: 0.85rem; color: rgba(255,255,255,0.5);
}
.footer-bottom a:hover { color: var(--azure-lt); }

/* ───────────────── REVEAL ANIMATION ───────────────── */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

.hero-title [data-reveal-line] { transition: transform 1s var(--ease); }
.hero-title.in [data-reveal-line] { transform: translateY(0); }

/* ───────────────── RESPONSIVE ───────────────── */
@media (max-width: 900px) {
  .hero { min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; min-height: auto; }
  .hero-inner {
    justify-self: stretch; max-width: none; align-self: auto;
    padding: 8rem var(--pad) 3rem; order: 1;
  }
  .hero-media { order: 2; min-height: 46vh; }
  .hero-media-edge {
    background: linear-gradient(0deg, transparent 60%, var(--navy-800) 100%);
  }
  .scroll-cue { display: none; }

  .who-grid, .approach-grid { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1.5rem; }
  .approach-visual { aspect-ratio: 16 / 11; order: -1; }

  .nav-links {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px);
    background: var(--navy-800); flex-direction: column; justify-content: center;
    align-items: flex-start; padding: 0 2.4rem; gap: 1.8rem;
    transform: translateX(100%); transition: transform 0.45s var(--ease);
    box-shadow: -20px 0 60px -20px rgba(0,0,0,0.5);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 1.3rem; }
  .nav-toggle { display: block; z-index: 110; }
}

@media (max-width: 540px) {
  .contact-form { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}

/* ───────────────── REDUCED MOTION ───────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; }
  .hero-title [data-reveal-line] { transform: none; }
}
