/* Algoinsight — premium dark + gold */
:root {
  --bg: #0c0b09;
  --bg-elevated: #151310;
  --bg-soft: #1c1914;
  --line: rgba(201, 162, 39, 0.22);
  --line-strong: rgba(201, 162, 39, 0.45);
  --gold: #c9a227;
  --gold-bright: #e0c35a;
  --gold-muted: #8a7428;
  --cream: #f3ece0;
  --cream-dim: #b8b0a2;
  --text: #efe8db;
  --text-muted: #9a9286;
  --danger: #c45c4a;
  --success: #5a9e6f;
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Figtree", "Helvetica Neue", sans-serif;
  --radius: 2px;
  --header-h: 4.5rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(201, 162, 39, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(201, 162, 39, 0.06), transparent 45%),
    var(--bg);
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold-bright);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

a:hover {
  color: var(--cream);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  color: var(--cream);
  margin: 0 0 0.75rem;
}

h1 { font-size: clamp(2.75rem, 6vw, 4.75rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.75rem); }

p { margin: 0 0 1rem; color: var(--cream-dim); }

.container {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.container-narrow {
  width: min(760px, calc(100% - 2.5rem));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 11, 9, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.65rem;
  letter-spacing: 0.04em;
  color: var(--cream) !important;
  font-weight: 600;
}

.brand:hover { color: var(--gold-bright) !important; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--cream-dim);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--gold-bright);
}

.site-nav .nav-cta {
  border: 1px solid var(--line-strong);
  padding: 0.45rem 0.95rem;
  color: var(--gold);
}

.site-nav .nav-cta:hover {
  background: rgba(201, 162, 39, 0.12);
  color: var(--cream);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 1.15rem;
  height: 1.5px;
  background: var(--gold);
}

@media (max-width: 960px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem 1.25rem 1.75rem;
    gap: 0.85rem;
  }
  .site-nav.is-open { display: flex; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 0.85rem 1.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #d4af37, #a8861f);
  color: #1a1508 !important;
  font-weight: 600;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #e0c35a, #c9a227);
  color: #0c0b09 !important;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--gold) !important;
}

.btn-ghost:hover {
  background: rgba(201, 162, 39, 0.1);
  color: var(--cream) !important;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

/* Hero variants */
.hero-full {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero-full::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 11, 9, 0.35) 0%, rgba(12, 11, 9, 0.72) 55%, rgba(12, 11, 9, 0.96) 100%),
    var(--hero-image) center / cover no-repeat;
  z-index: 0;
  animation: heroZoom 18s var(--ease) forwards;
}

.hero-full .hero-content {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 2.5rem));
  margin: 0 auto 4.5rem;
  max-width: 38rem;
}

.hero-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.hero-full h1 {
  margin-bottom: 1rem;
}

.hero-full .lede {
  font-size: 1.15rem;
  color: var(--cream-dim);
  max-width: 32rem;
}

.hero-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: calc(92vh - var(--header-h));
  border-bottom: 1px solid var(--line);
}

.hero-split .copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.25rem, 4vw, 4rem);
  background:
    linear-gradient(160deg, rgba(201, 162, 39, 0.08), transparent 40%),
    var(--bg);
}

.hero-split .visual {
  position: relative;
  min-height: 420px;
  background: center / cover no-repeat;
}

.hero-split .visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg), transparent 35%);
}

.brand-mark {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  color: var(--cream);
  line-height: 0.95;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

.gold-rule {
  width: 4rem;
  height: 1px;
  background: var(--gold);
  margin: 1.25rem 0 1.5rem;
  border: none;
}

@keyframes heroZoom {
  from { transform: scale(1.06); }
  to { transform: scale(1); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Sections */
.section {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}

.section-head {
  max-width: 36rem;
  margin-bottom: 2.75rem;
}

.section-head .eyebrow {
  color: var(--gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 0.75rem;
}

.section-muted {
  background: var(--bg-elevated);
  border-block: 1px solid var(--line);
}

.section-gold-edge {
  border-top: 1px solid var(--line);
}

/* Trust strip */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--line);
}

.trust-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.35rem;
  color: var(--gold-bright);
  font-weight: 500;
}

.trust-item span {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Course / content grids */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.course-tile {
  display: block;
  color: inherit;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.5rem;
  transition: border-color 0.3s var(--ease);
}

.course-tile:hover {
  border-color: var(--line-strong);
}

.course-tile .thumb {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
  margin-bottom: 1.15rem;
  filter: saturate(0.85) contrast(1.05);
  transition: filter 0.4s var(--ease), transform 0.5s var(--ease);
}

.course-tile:hover .thumb {
  filter: saturate(1) contrast(1.08);
  transform: scale(1.015);
}

.course-tile h3 {
  color: var(--cream);
  margin-bottom: 0.5rem;
}

.course-tile p {
  font-size: 0.98rem;
  margin: 0;
}

.meta {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-muted);
  margin-bottom: 0.5rem;
}

/* Feature list */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: center;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.feature-list li:first-child {
  border-top: 1px solid var(--line);
}

.feature-list h3 {
  font-size: 1.4rem;
  margin-bottom: 0.35rem;
}

.feature-list p {
  margin: 0;
  font-size: 0.98rem;
}

.feature-media {
  position: relative;
}

.feature-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.feature-media::before {
  content: "";
  position: absolute;
  inset: 1.25rem -1.25rem -1.25rem 1.25rem;
  border: 1px solid var(--line-strong);
  z-index: -1;
}

/* Testimonials */
.quote-block {
  border-left: 2px solid var(--gold);
  padding: 0.25rem 0 0.25rem 1.5rem;
  margin-bottom: 2.25rem;
}

.quote-block p {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--cream);
  line-height: 1.45;
  margin-bottom: 0.85rem;
}

.quote-block cite {
  font-style: normal;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.testimonial-stack .quote-block:nth-child(even) p {
  font-size: 1.15rem;
  font-family: var(--font-body);
}

.rating {
  color: var(--gold);
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

/* Pricing */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}

.price-tier {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
}

.price-tier.featured {
  border-color: var(--gold);
  background:
    linear-gradient(180deg, rgba(201, 162, 39, 0.12), transparent 40%),
    var(--bg-soft);
  transform: translateY(-0.5rem);
}

.price-tier h3 {
  margin-bottom: 0.35rem;
}

.price-tier .amount {
  font-family: var(--font-display);
  font-size: 2.75rem;
  color: var(--gold-bright);
  margin: 1rem 0 0.35rem;
}

.price-tier .amount span {
  font-size: 1rem;
  color: var(--text-muted);
}

.price-tier ul {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 2rem;
  flex: 1;
}

.price-tier li {
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--cream-dim);
  font-size: 0.95rem;
}

/* Blog */
.blog-list article {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.75rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.blog-list img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.article-body {
  padding: 2.5rem 0 4rem;
}

.article-body h2 {
  margin-top: 2.5rem;
}

.article-body ul,
.article-body ol {
  color: var(--cream-dim);
  padding-left: 1.25rem;
}

.article-hero {
  aspect-ratio: 21 / 9;
  width: 100%;
  object-fit: cover;
  margin: 1.5rem 0 2rem;
}

/* Forms */
.form {
  display: grid;
  gap: 1.15rem;
}

.form-row {
  display: grid;
  gap: 0.4rem;
}

.form label {
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  color: var(--cream-dim);
}

.form input,
.form select,
.form textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.85rem 1rem;
  font: inherit;
  border-radius: var(--radius);
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.form .error {
  color: var(--danger);
  font-size: 0.85rem;
  min-height: 1.1em;
}

.form-status {
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  display: none;
}

.form-status.is-success {
  display: block;
  border-color: var(--success);
  color: var(--success);
}

.form-status.is-error {
  display: block;
  border-color: var(--danger);
  color: var(--danger);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
}

.contact-details {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  padding: 2rem;
}

.contact-details h2 {
  margin-bottom: 1.25rem;
}

.contact-details p {
  margin-bottom: 1rem;
}

/* Legal */
.legal-page {
  padding: 3rem 0 5rem;
}

.legal-page h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  margin-bottom: 0.5rem;
}

.legal-meta {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.legal-page h2 {
  margin-top: 2.25rem;
  font-size: 1.65rem;
}

.legal-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0 2rem;
  font-size: 0.92rem;
}

.legal-page th,
.legal-page td {
  border: 1px solid var(--line);
  padding: 0.75rem;
  text-align: left;
  vertical-align: top;
}

.legal-page th {
  background: var(--bg-elevated);
  color: var(--gold);
  font-weight: 500;
}

/* FAQ */
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 1.15rem 0;
}

.faq summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--cream);
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq details[open] summary {
  color: var(--gold-bright);
}

.faq details p {
  margin-top: 0.75rem;
}

/* Modules */
.module-list {
  counter-reset: module;
  list-style: none;
  padding: 0;
  margin: 0;
}

.module-list li {
  counter-increment: module;
  padding: 1.35rem 0 1.35rem 4rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.module-list li::before {
  content: counter(module, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1.35rem;
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.25rem;
}

/* CTA band */
.cta-band {
  text-align: center;
  padding: clamp(3.5rem, 8vw, 5.5rem) 1.25rem;
  background:
    radial-gradient(ellipse at center, rgba(201, 162, 39, 0.14), transparent 60%),
    var(--bg-elevated);
  border-block: 1px solid var(--line);
}

.cta-band h2 {
  max-width: 18ch;
  margin-inline: auto;
}

.cta-band p {
  max-width: 42ch;
  margin-inline: auto;
}

/* 404 */
.page-404 {
  min-height: calc(100vh - var(--header-h) - 220px);
  display: grid;
  place-content: center;
  text-align: center;
  padding: 4rem 1.25rem;
}

.page-404 .code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 15vw, 9rem);
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.5rem;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(21, 19, 16, 0.97);
  border-top: 1px solid var(--line-strong);
  padding: 1.25rem;
  transform: translateY(110%);
  transition: transform 0.45s var(--ease);
  box-shadow: var(--shadow);
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-inner {
  width: min(1120px, 100%);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.cookie-inner p {
  margin: 0;
  flex: 1 1 280px;
  font-size: 0.95rem;
}

.cookie-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.inline-error {
  background: rgba(196, 92, 74, 0.15);
  border: 1px solid var(--danger);
  color: #e8a99e;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  background: #090807;
  border-top: 1px solid var(--line);
  padding: 3.5rem 0 0;
  margin-top: 2rem;
}

.footer-grid {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
  gap: 2rem;
}

.footer-grid h3 {
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-grid li { margin-bottom: 0.45rem; }

.footer-grid a {
  color: var(--cream-dim);
  font-size: 0.95rem;
}

.footer-grid a:hover { color: var(--gold-bright); }

.footer-address {
  font-size: 0.92rem;
  line-height: 1.55;
}

.footer-bottom {
  width: min(1120px, calc(100% - 2.5rem));
  margin: 2.5rem auto 0;
  padding: 1.25rem 0 1.75rem;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-bottom p { margin: 0; color: inherit; }

/* Instructor */
.instructor {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.5rem;
  align-items: start;
  margin: 2rem 0;
}

.instructor img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border: 1px solid var(--line);
}

/* Case study */
.case-study {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 2rem;
}

.case-study h3 {
  color: var(--gold-bright);
}

/* Page hero compact */
.page-intro {
  padding: clamp(2.75rem, 6vw, 4.5rem) 0 2rem;
  border-bottom: 1px solid var(--line);
}

.page-intro h1 {
  font-size: clamp(2.4rem, 5vw, 3.75rem);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-split .visual { min-height: 280px; }
  .hero-split .visual::after {
    background: linear-gradient(180deg, var(--bg), transparent 40%);
  }
  .trust-strip { grid-template-columns: 1fr 1fr; }
  .grid-3,
  .price-grid,
  .grid-2,
  .feature-row,
  .contact-layout,
  .footer-grid,
  .blog-list article {
    grid-template-columns: 1fr;
  }
  .price-tier.featured { transform: none; }
  .feature-media::before { display: none; }
  .instructor { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .trust-strip { grid-template-columns: 1fr; }
}

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