/* AlgorithmiTech — premium dark theme */
:root {
  --bg: #07080b;
  --bg-elevated: #0f1218;
  --bg-panel: #141821;
  --bg-soft: #1a1f2b;
  --line: rgba(232, 213, 163, 0.14);
  --line-strong: rgba(232, 213, 163, 0.28);
  --text: #f3efe6;
  --text-muted: #a39b8c;
  --gold: #c9a227;
  --gold-soft: #e8d5a3;
  --gold-deep: #8f7112;
  --teal: #3d8b7a;
  --danger: #d46a6a;
  --success: #6fb58a;
  --radius: 2px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font-display: "Syne", sans-serif;
  --font-body: "Manrope", sans-serif;
  --header-h: 4.5rem;
  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::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.65;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(201, 162, 39, 0.12), transparent 55%),
    radial-gradient(900px 500px at 10% 20%, rgba(61, 139, 122, 0.08), transparent 50%),
    linear-gradient(180deg, #0a0c10 0%, var(--bg) 40%, #050608 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

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

a {
  color: var(--gold-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.2s var(--ease);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1rem; color: var(--text-muted); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  background: var(--gold);
  color: #111;
  padding: 0.6rem 1rem;
  z-index: 1000;
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 1.55rem;
  height: 1.55rem;
  border: 2px solid var(--gold);
  border-radius: 50% 50% 50% 12%;
  box-shadow: inset 0 0 0 3px rgba(201, 162, 39, 0.2);
  transform: rotate(-18deg);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

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

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav .nav-cta {
  color: #111;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  font-weight: 700;
}

.site-nav .nav-cta:hover {
  color: #111;
  filter: brightness(1.05);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line-strong);
  background: transparent;
  cursor: pointer;
  position: relative;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  height: 2px;
  background: var(--gold-soft);
  top: 50%;
}

.nav-toggle-bar::before { transform: translateY(-6px); }
.nav-toggle-bar::after { transform: translateY(6px); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.5rem;
    background: rgba(10, 12, 16, 0.98);
    border-bottom: 1px solid var(--line);
    display: none;
    gap: 0;
  }
  .site-nav[data-open="true"] { display: flex; }
  .site-nav a {
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--line);
  }
  .site-nav .nav-cta {
    margin-top: 0.75rem;
    text-align: center;
  }
}

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

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #111;
}

.btn-primary:hover { color: #111; }

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

.btn-ghost:hover { border-color: var(--gold); color: var(--gold-soft); }

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

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

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.42) saturate(0.85);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 8, 11, 0.92) 0%, rgba(7, 8, 11, 0.55) 48%, rgba(7, 8, 11, 0.35) 100%),
    linear-gradient(0deg, rgba(7, 8, 11, 0.95) 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: 5rem 0 4.5rem;
  max-width: 720px;
  margin-left: max(1.25rem, calc((100% - var(--max)) / 2));
  animation: rise 0.9s var(--ease) both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
  font-weight: 700;
}

.hero h1 {
  color: var(--text);
  margin-bottom: 1rem;
}

.hero .lede {
  font-size: 1.12rem;
  max-width: 36rem;
  color: #d6d0c4;
}

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

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section- Tight {
  padding: 3.5rem 0;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

.section-head p { margin-bottom: 0; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.panel {
  background: linear-gradient(160deg, rgba(20, 24, 33, 0.95), rgba(15, 18, 24, 0.9));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

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

/* Trust strip — after hero, before featured */
.trust-strip {
  border-block: 1px solid var(--line);
  background: rgba(15, 18, 24, 0.65);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 2rem 0;
}

.trust-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.85rem;
  color: var(--gold-soft);
  margin-bottom: 0.25rem;
}

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

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

/* Featured course deep dive */
.featured {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg-elevated);
}

.featured-media {
  min-height: 360px;
  position: relative;
}

.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.featured-body {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 900px) {
  .featured { grid-template-columns: 1fr; }
  .featured-media { min-height: 240px; position: relative; }
}

/* Benefit list — not cards */
.benefit-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.benefit-row {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1.25rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.benefit-num {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.4rem;
  font-weight: 700;
}

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

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

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

.media-tile {
  display: block;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.25rem;
  transition: border-color 0.25s;
}

.media-tile:hover {
  border-color: var(--gold);
}

.media-tile img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  margin-bottom: 1rem;
  filter: saturate(0.9);
}

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

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

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

@media (max-width: 900px) {
  .price-grid { grid-template-columns: 1fr; }
}

.price-tier {
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  padding: 2rem 1.6rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s, transform 0.3s var(--ease);
}

.price-tier:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
}

.price-tier.featured-tier {
  border-color: var(--gold);
  background:
    linear-gradient(180deg, rgba(201, 162, 39, 0.08), transparent 40%),
    var(--bg-panel);
}

.price-tier h3 { color: var(--text); }

.price-amount {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--gold-soft);
  margin: 0.75rem 0;
}

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

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

.price-tier li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.price-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2rem;
  max-width: 40rem;
}

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

.quote-block p {
  color: var(--text);
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

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

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

.case-study {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  padding: 2rem;
  margin-top: 2rem;
}

/* Forms */
.form {
  display: grid;
  gap: 1.15rem;
  max-width: 36rem;
}

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

.form label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

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

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: 2px solid rgba(201, 162, 39, 0.45);
  outline-offset: 1px;
  border-color: var(--gold);
}

.form textarea { min-height: 140px; resize: vertical; }

.field-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-aside address {
  font-style: normal;
  color: var(--text-muted);
  line-height: 1.8;
}

/* Page hero (inner) */
.page-hero {
  padding: 4rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 { max-width: 18ch; }

.page-hero .lede {
  max-width: 40rem;
  color: #d6d0c4;
}

.prose {
  max-width: 46rem;
}

.prose h2 {
  margin-top: 2.5rem;
  color: var(--text);
}

.prose h3 {
  margin-top: 1.75rem;
  color: var(--gold-soft);
}

.prose ul, .prose ol {
  color: var(--text-muted);
  padding-left: 1.25rem;
}

.prose li { margin-bottom: 0.45rem; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

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

.prose th {
  background: var(--bg-soft);
  color: var(--gold-soft);
  font-weight: 600;
}

/* Course detail */
.module-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.module-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1rem;
}

.module-list .mod-n {
  font-family: var(--font-display);
  color: var(--gold);
  font-weight: 700;
}

.instructor {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.5rem;
  align-items: center;
  margin: 2rem 0;
}

.instructor img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
}

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

.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
}

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

.faq summary::before {
  content: "+";
  color: var(--gold);
  margin-right: 0.65rem;
  font-weight: 700;
}

.faq details[open] summary::before { content: "–"; }

.faq details p {
  margin: 0.75rem 0 0.25rem;
  padding-left: 1.35rem;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(15, 18, 24, 0.97);
  border-top: 1px solid var(--line-strong);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  animation: rise 0.5s var(--ease);
}

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

.cookie-inner p {
  margin: 0;
  flex: 1 1 280px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

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

.inline-error {
  margin: 1rem auto;
  width: min(100% - 2.5rem, var(--max));
  padding: 0.85rem 1rem;
  border: 1px solid var(--danger);
  color: var(--danger);
  background: rgba(212, 106, 106, 0.08);
}

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

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

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.footer-tag {
  font-size: 0.92rem;
}

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

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

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

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-col a:hover { color: var(--gold-soft); }

.footer-col address {
  font-style: normal;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.8;
}

.footer-bottom {
  width: min(100% - 2.5rem, var(--max));
  margin: 2.5rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.footer-bottom p {
  margin: 0;
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

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

/* 404 */
.error-page {
  min-height: 70vh;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 3rem 1.25rem;
}

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

/* Misc */
.avatar-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.avatar-row img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 2.5rem 0;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid rgba(61, 139, 122, 0.4);
  padding: 0.25rem 0.55rem;
  margin-bottom: 0.75rem;
}
