/* ============================================================
   Twin Hills Capital Management
   Palette drawn from the logo (charcoal-navy + steel blue).
   Type pairs Cormorant Garamond (display) with DM Sans (UI).
   ============================================================ */

:root {
  /* Surfaces */
  --ink-900: #081019;
  --ink-800: #0B1822;
  --ink-700: #0E2230;
  --ink-600: #14303F;
  --line: rgba(233, 241, 247, 0.10);
  --line-strong: rgba(233, 241, 247, 0.18);

  /* Text */
  --paper: #EAF2F8;
  --mist: #93A9BA;
  --mist-dim: #6B8093;

  /* Brand accent (the logo's water) */
  --accent: #4E8FB8;
  --accent-bright: #7FB6D6;
  --accent-deep: #2C6286;

  /* Type */
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Metrics */
  --container: 1140px;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--ink-800);
  color: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

::selection {
  background: rgba(127, 182, 214, 0.28);
  color: #fff;
}

/* Keyboard-only focus ring; never show the box on click / programmatic focus. */
:focus:not(:focus-visible) { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(22px, 5vw, 48px);
}

.section {
  position: relative;
  padding-block: clamp(80px, 12vw, 150px);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 10px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Shared type ---------- */
.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 1.25rem;
}

.section__title,
.contact__title,
.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.012em;
  color: #fff;
}

.section__title { font-size: clamp(2.1rem, 5vw, 3.4rem); }

.section__head {
  max-width: 720px;
  margin-bottom: clamp(48px, 7vw, 84px);
}

.section__intro {
  margin-top: 1.4rem;
  color: var(--mist);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  max-width: 60ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 0.95em 1.8em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.35s var(--ease), background-color 0.35s var(--ease),
    border-color 0.35s var(--ease), color 0.35s var(--ease), box-shadow 0.35s var(--ease);
  will-change: transform;
}

.btn--primary {
  background: var(--accent);
  color: #07131c;
  box-shadow: 0 14px 36px -16px rgba(78, 143, 184, 0.85);
}
.btn--primary:hover {
  background: var(--accent-bright);
  transform: translateY(-2px);
  box-shadow: 0 20px 44px -16px rgba(127, 182, 214, 0.9);
}

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--paper);
  padding-block: 0.7em;
}
.btn--ghost:hover {
  border-color: var(--accent-bright);
  color: #fff;
  background: rgba(127, 182, 214, 0.08);
}

.btn--text {
  padding-inline: 0.4em;
  color: var(--paper);
}
.btn--text span { transition: transform 0.35s var(--ease); }
.btn--text:hover { color: var(--accent-bright); }
.btn--text:hover span { transform: translateX(5px); }

.btn--lg {
  font-size: 1.05rem;
  padding: 1.05em 2.2em;
  letter-spacing: 0.01em;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease),
    backdrop-filter 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(9, 18, 26, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.brand__mark {
  width: 42px;
  height: auto;
  flex: none;
  transition: transform 0.4s var(--ease);
}
.brand:hover .brand__mark { transform: translateY(-2px); }

.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name {
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
}
.brand__sub {
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mist);
  margin-top: 2px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 3vw, 2.6rem);
}
.nav__links > a:not(.btn) {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--mist);
  letter-spacing: 0.01em;
  position: relative;
  padding-block: 6px;
  transition: color 0.3s var(--ease);
}
.nav__links > a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.nav__links > a:not(.btn):hover { color: #fff; }
.nav__links > a:not(.btn):hover::after { transform: scaleX(1); }

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--paper);
  transition: transform 0.35s var(--ease), opacity 0.25s var(--ease);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--ink-800);
}
.hero__scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(8, 16, 25, 0.92) 0%, rgba(8, 16, 25, 0.55) 38%, rgba(8, 16, 25, 0) 68%),
    linear-gradient(0deg, rgba(8, 16, 25, 0.85) 0%, rgba(8, 16, 25, 0) 32%);
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding-block: 120px 96px;
}
.hero__title {
  font-size: clamp(2.85rem, 7.2vw, 5.4rem);
  margin-bottom: 1.6rem;
}
.hero__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent-bright);
}
.hero__lead {
  font-size: clamp(1.1rem, 2.1vw, 1.35rem);
  color: var(--mist);
  max-width: 56ch;
  margin-bottom: 2.6rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.6rem;
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px;
  height: 42px;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.hero__scroll span {
  width: 3px;
  height: 8px;
  border-radius: 3px;
  background: var(--accent-bright);
  animation: scrollcue 1.8s var(--ease) infinite;
}
@keyframes scrollcue {
  0% { opacity: 0; transform: translateY(-4px); }
  40% { opacity: 1; }
  80%, 100% { opacity: 0; transform: translateY(10px); }
}

/* ---------- Approach / Cards ---------- */
.approach { background: var(--ink-800); }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.4vw, 28px);
}

.card {
  position: relative;
  padding: clamp(28px, 3vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(20, 48, 63, 0.5) 0%, rgba(11, 24, 34, 0.4) 100%);
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease),
    background-color 0.5s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
}
.card:hover::before { transform: scaleX(1); }

.card__num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.card__title {
  font-family: var(--font-sans);
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  color: #fff;
  margin: 1.1rem 0 0.75rem;
}
.card p { color: var(--mist); font-size: 1.0rem; }

/* ---------- Contact ---------- */
.contact {
  text-align: center;
  background:
    radial-gradient(120% 130% at 50% 0%, rgba(20, 48, 63, 0.55) 0%, rgba(11, 24, 34, 0) 60%),
    var(--ink-900);
  border-top: 1px solid var(--line);
}
.contact__inner { max-width: 680px; }
.contact__title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin-bottom: 1.3rem;
}
.contact__intro {
  color: var(--mist);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  margin: 0 auto 2.6rem;
  max-width: 48ch;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink-900);
  border-top: 1px solid var(--line);
  padding-block: 46px;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.brand--footer .brand__mark { width: 38px; }
.footer__meta { text-align: right; }
.footer__email {
  font-weight: 600;
  color: var(--paper);
  transition: color 0.3s var(--ease);
}
.footer__email:hover { color: var(--accent-bright); }
.footer__copy {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--mist-dim);
  letter-spacing: 0.01em;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
  transition-delay: calc(var(--d, 0) * 110ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  body { font-size: 16px; }

  .nav__toggle { display: flex; }

  .nav__links {
    position: fixed;
    inset: 80px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px clamp(22px, 5vw, 48px) 28px;
    background: rgba(9, 18, 26, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  }
  .nav__links.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .nav__links > a:not(.btn) {
    padding: 16px 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
  }
  .nav__links > a:not(.btn)::after { display: none; }
  .nav__cta {
    margin-top: 18px;
    justify-content: center;
  }

  .cards { grid-template-columns: 1fr; }

  .footer__inner { flex-direction: column; align-items: flex-start; gap: 22px; }
  .footer__meta { text-align: left; }
}

@media (max-width: 480px) {
  .hero__actions { gap: 0.9rem; }
  .hero__actions .btn--primary { width: 100%; justify-content: center; }
  .brand__sub { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
