/* AICE Capital Partners — site styles
   Palette pulled from the logo: navy wordmark, blue → teal → green accent. */
:root {
  --navy: #0b2a5b;
  --navy-deep: #071c3d;
  --blue: #1f6fd1;
  --teal: #14b0b5;
  --green: #7ed321;
  --ink: #0f172a;
  --muted: #475569;
  --line: #dbe3ee;
  --bg: #ffffff;
  --bg-alt: #f4f7fb;
  --grad: linear-gradient(90deg, var(--blue) 0%, var(--teal) 55%, var(--green) 100%);
  --display: "Montserrat", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }

/* Type */
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0 0 0.5em;
  color: var(--navy);
}
h1 { font-size: clamp(2.4rem, 6vw, 4.25rem); font-weight: 900; text-transform: uppercase; letter-spacing: 0.01em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.06em; }
p  { margin: 0 0 1em; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 46em; }

.eyebrow, .kicker, .footer-tag {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.8rem;
}
.eyebrow { color: var(--navy); margin-bottom: 1rem; }
.kicker  { color: var(--teal); margin-bottom: 0.75rem; }
.sep { color: var(--teal); padding: 0 0.35em; font-weight: 500; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 12px 24px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand img { width: 150px; height: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  font-family: var(--display); font-weight: 700; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.12em; text-decoration: none; color: var(--navy);
}
.nav a:hover { color: var(--blue); }
.nav-cta {
  padding: 10px 18px; border-radius: 6px;
  background: var(--navy); color: #fff !important;
}
.nav-cta:hover { background: var(--blue); }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(80px, 12vw, 160px) 0;
  background: var(--bg);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(31,111,209,0.12), transparent 60%),
    radial-gradient(600px 400px at 10% 90%, rgba(126,211,33,0.12), transparent 60%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: var(--grad);
}
.hero .wrap { position: relative; }
.hero h1 { max-width: 14ch; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 1.5rem; }

/* Buttons */
.btn {
  display: inline-block; padding: 14px 26px; border-radius: 6px;
  font-family: var(--display); font-weight: 700; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.1em; text-decoration: none;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--blue); }
.btn-ghost { border: 2px solid var(--navy); color: var(--navy); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.section-dark .btn-primary { background: var(--grad); color: var(--navy-deep); }
.section-dark .btn-primary:hover { filter: brightness(1.08); }

/* Sections */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--navy-deep); color: #e2e8f0; }
.section-dark h2 { color: #fff; }
.section-dark .lede { color: #b6c2d6; }
.section-dark .kicker { color: var(--green); }

.grid { display: grid; gap: 22px; margin-top: 2.5rem; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.two   { grid-template-columns: repeat(2, 1fr); }

.card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  position: relative;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 24px; right: 24px; height: 3px;
  background: var(--grad); border-radius: 0 0 3px 3px;
}
.card h3 { margin-top: 6px; }
.card p { margin: 0; color: var(--muted); }

/* Stack list */
.stack { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 0; }
.stack li {
  display: grid; grid-template-columns: 90px 1fr; gap: 20px; align-items: start;
  padding: 28px 0; border-top: 1px solid var(--line);
}
.stack li:last-child { border-bottom: 1px solid var(--line); }
.stack-num {
  font-family: var(--display); font-weight: 900; font-size: 2.2rem; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stack p { margin: 0; color: var(--muted); max-width: 56em; }

/* Footer */
.site-footer { padding: 28px 0; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-tag { color: var(--navy); letter-spacing: 0.22em; }

/* Responsive */
@media (max-width: 900px) {
  .grid.three { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .site-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .nav { gap: 16px; flex-wrap: wrap; }
  .nav a { font-size: 0.75rem; }
  .grid.three, .grid.two { grid-template-columns: 1fr; }
  .stack li { grid-template-columns: 60px 1fr; }
  .stack-num { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* ---------- Blog / Insights ---------- */
.page-head { padding-bottom: clamp(32px, 5vw, 56px); }
.page-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem); text-transform: none; letter-spacing: -0.01em;
}
.post-list { display: grid; gap: 22px; margin-top: 1.5rem; }
.post-card {
  display: block; padding: 28px 30px; text-decoration: none;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  position: relative; transition: transform .15s ease, box-shadow .15s ease;
}
.post-card::before {
  content: ""; position: absolute; top: 0; left: 24px; right: 24px; height: 3px;
  background: var(--grad); border-radius: 0 0 3px 3px;
}
.post-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(11,42,91,0.08); }
.post-card h2, .post-card-title {
  font-size: 1.35rem; text-transform: none; letter-spacing: -0.01em; margin: 6px 0 10px;
}
.post-card p { color: var(--muted); margin: 0 0 12px; }
.post-card-meta { font-size: 0.85rem; color: var(--teal); font-weight: 600; margin: 0; }
.read-more, .more-link a {
  font-family: var(--display); font-weight: 700; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--navy); text-decoration: none;
}
.more-link { margin-top: 1.5rem; }
.more-link a:hover, .post-card:hover .read-more { color: var(--blue); }

/* Single post */
.post-header { padding: clamp(56px, 8vw, 96px) 0 clamp(24px, 4vw, 40px); }
.post-header h1 {
  font-size: clamp(1.9rem, 4.2vw, 3rem); text-transform: none; letter-spacing: -0.015em;
  font-weight: 800; max-width: none;
}
.post-meta { color: var(--muted); font-size: 0.95rem; margin: 0; }
.post-body { padding-bottom: clamp(64px, 9vw, 120px); }
.post-body h2 { font-size: 1.5rem; margin-top: 2.2em; }
.post-body p { font-size: 1.05rem; }
.post-body .lede { font-size: 1.25rem; color: var(--ink); }
.source-box {
  padding: 18px 22px; margin: 0 0 2rem; border-left: 4px solid var(--teal);
  background: var(--bg-alt); border-radius: 0 8px 8px 0; font-size: 0.95rem; color: var(--muted);
}
.source-box p { margin: 0; font-size: 0.95rem; }
.source-box a { color: var(--navy); font-weight: 600; }
table.data {
  width: 100%; border-collapse: collapse; margin: 1.5rem 0 1rem; font-size: 0.95rem;
}
table.data th, table.data td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th {
  font-family: var(--display); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--navy);
  border-bottom: 2px solid var(--navy);
}
table.data td:nth-child(2) { font-weight: 700; color: var(--navy); white-space: nowrap; }
blockquote {
  margin: 2rem 0; padding: 8px 0 8px 24px; border-left: 4px solid transparent;
  border-image: var(--grad) 1;
}
blockquote p { font-family: var(--display); font-weight: 700; font-size: 1.4rem; color: var(--navy); margin: 0 0 6px; }
blockquote cite { font-style: normal; color: var(--muted); font-size: 0.9rem; }
.takeaway {
  margin-top: 3rem; padding: 32px; border-radius: 12px;
  background: var(--navy-deep); color: #e2e8f0;
}
.takeaway .kicker { color: var(--green); }
.takeaway h2 { color: #fff; margin-top: 0; }
.takeaway p, .takeaway li { color: #cbd5e1; }
.takeaway li { margin-bottom: 0.8em; }
.takeaway strong { color: #fff; }
.takeaway a { color: var(--green); font-weight: 600; }
.back { margin-top: 2.5rem; }
.back a { font-family: var(--display); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--navy); text-decoration: none; }
@media (max-width: 680px) {
  table.data { font-size: 0.85rem; }
  table.data th, table.data td { padding: 10px 6px; }
  .takeaway { padding: 22px; }
}

/* Home teaser shows the latest posts in two columns on wide screens */
#insights .post-list { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { #insights .post-list { grid-template-columns: 1fr; } }

/* Hero tagline: AI | Compute | Energy, larger and coloured like the logo */
.hero-tagline {
  font-size: clamp(1.05rem, 2.4vw, 1.6rem);
  font-weight: 800;
  letter-spacing: 0.3em;
  margin-bottom: 1.25rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.1em 0;
}
.hero-tagline .sep { color: var(--line); font-weight: 500; padding: 0 0.55em; font-size: 1.1em; }
.hero-tagline .w-ai      { color: var(--blue); }
.hero-tagline .w-compute { color: var(--teal); }
.hero-tagline .w-energy  { color: var(--green); }
@media (max-width: 680px) { .hero-tagline { letter-spacing: 0.18em; } .hero-tagline .sep { padding: 0 0.4em; } }

/* ---------- Contact form ---------- */
.contact-form { margin-top: 1.5rem; text-align: left; display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-form label {
  display: grid; gap: 6px;
  font-family: var(--display); font-weight: 700; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.1em; color: #b6c2d6;
}
.contact-form .req { color: var(--green); }
.contact-form input, .contact-form select, .contact-form textarea {
  font: 400 1rem/1.4 var(--body); color: #fff;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18); border-radius: 6px;
  padding: 12px 14px; width: 100%;
  transition: border-color .15s ease, background .15s ease;
}
.contact-form select { appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #b6c2d6 50%), linear-gradient(135deg, #b6c2d6 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.contact-form select option { color: var(--ink); }
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #7a8aa3; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--teal); background: rgba(255,255,255,0.1);
  box-shadow: 0 0 0 3px rgba(20,176,181,0.25);
}
.contact-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.form-actions .btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }
.form-status { margin: 0; font-size: 0.95rem; color: #b6c2d6; }
.form-status.is-ok { color: var(--green); }
.form-status.is-error { color: #ff8a8a; }
@media (max-width: 680px) { .form-row { grid-template-columns: 1fr; } }

/* Brand tagline beside the header logo */
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.brand-tagline {
  font-family: var(--display); font-weight: 600; font-size: 0.72rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  border-left: 1px solid var(--line); padding-left: 16px; line-height: 1.3;
  max-width: 11em;
}
@media (max-width: 900px) {
  /* Narrow screens: smaller logo, tagline stays beside it on two short lines */
  .brand { gap: 10px; }
  .brand img { width: 112px; }
  .brand-tagline { font-size: 0.6rem; letter-spacing: 0.06em; padding-left: 10px; max-width: 10.5em; }
}
@media (max-width: 680px) {
  /* Phones: nav links become bordered pills so they are clearly tappable
     and cannot be confused with the plain-text tagline */
  .nav { gap: 8px; width: 100%; }
  .nav a {
    padding: 8px 12px; border: 1.5px solid var(--navy); border-radius: 999px;
    font-size: 0.7rem; letter-spacing: 0.08em; line-height: 1;
  }
  .nav a:hover { border-color: var(--blue); }
  .nav-cta { border-color: var(--navy); }
}

/* Active nav state: the section in view (home) or the current page (blog).
   No underlines; a filled/tinted pill is the only indicator. */
.nav a { border-radius: 999px; }
.nav a.is-active, .nav a[aria-current="page"] {
  color: var(--navy); background: rgba(11,42,91,0.08); padding: 8px 14px; margin: -8px -14px;
}
@media (max-width: 680px) {
  .nav a.is-active, .nav a[aria-current="page"] {
    background: var(--navy); color: #fff; border-color: var(--navy); padding: 8px 12px; margin: 0;
  }
  .nav a:not(.nav-cta):active { background: var(--blue); color: #fff; border-color: var(--blue); }
}

/* Contact is an action, not a section, so it is always green */
.nav-cta, .nav-cta.is-active {
  background: var(--green) !important; color: var(--navy-deep) !important; border-color: var(--green) !important;
  padding: 10px 18px; margin: 0;
}
.nav-cta:hover, .nav-cta:active { background: #6fc01a !important; border-color: #6fc01a !important; }
@media (max-width: 680px) { .nav-cta, .nav-cta.is-active { padding: 8px 12px; } }
