:root {
  --ink: #0a0a0a;          /* RackPips black */
  --ink-soft: #555555;
  --paper: #ffffff;
  --surface: #f5f5f5;
  --line: #e2e2e2;
  --tp: #1f9e7f;           /* target / up candles */
  --tp-wash: rgba(31, 158, 127, 0.14);
  --sl: #d9485f;           /* stop / down candles */
  --sl-wash: rgba(217, 72, 95, 0.14);
  --zone: rgba(0, 0, 0, 0.07);
  --button-text: #ffffff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f5f5f5;
    --ink-soft: #a3a3a3;
    --paper: #0a0a0a;
    --surface: #171717;
    --line: #2a2a2a;
    --tp: #3cc29e;
    --tp-wash: rgba(60, 194, 158, 0.16);
    --sl: #f06a7f;
    --sl-wash: rgba(240, 106, 127, 0.16);
    --zone: rgba(255, 255, 255, 0.07);
    --button-text: #0a0a0a;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--tp); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h3 { font-size: 1.3rem; font-weight: 500; }
p { margin: 0; }

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

/* ---------- Header ---------- */
/* Transparent over the hero photo, turns solid white once you scroll */
.site-header {
  --hdr-fg: #ffffff;
  --hdr-soft: rgba(255, 255, 255, 0.78);
  --hdr-cta-bg: #ffffff;
  --hdr-cta-fg: #000000;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .25s ease, border-color .25s ease;
}
.site-header.scrolled,
.site-header.menu-open {
  --hdr-fg: var(--ink);
  --hdr-soft: var(--ink-soft);
  --hdr-cta-bg: var(--ink);
  --hdr-cta-fg: var(--button-text);
  background: var(--paper);
  border-bottom-color: var(--line);
}
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4.75rem;
}
.logo {
  font-family: "Inter Tight", "Instrument Sans", system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--hdr-fg);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.logo img { height: 34px; width: auto; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a { text-decoration: none; color: var(--hdr-soft); font-weight: 500; font-size: 0.98rem; }
.nav a:hover { color: var(--hdr-fg); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid var(--ink);
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-solid { background: var(--ink); color: var(--button-text); }
.btn-solid:hover { background: transparent; color: var(--ink); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--button-text); }

.nav .nav-cta {
  padding: 0.6rem 1.3rem;
  background: var(--hdr-cta-bg);
  border-color: var(--hdr-cta-bg);
  color: var(--hdr-cta-fg);
}
.nav .nav-cta:hover { opacity: 0.85; }

/* Hamburger in a circle (mobile only) */
.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--hdr-fg) 35%, transparent);
  background: color-mix(in srgb, var(--hdr-fg) 8%, transparent);
  cursor: pointer;
  position: relative;
}
.menu-toggle span {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--hdr-fg);
  transition: transform .2s ease, opacity .2s ease;
}
.menu-toggle span:nth-child(1) { top: 17px; }
.menu-toggle span:nth-child(2) { top: 22px; }
.menu-toggle span:nth-child(3) { top: 27px; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.25rem 1.5rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.12);
  }
  .menu-open .nav { display: flex; }
  .nav a {
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.1rem;
    color: var(--ink);
  }
  .nav .nav-cta { margin-top: 1.25rem; padding: 0.9rem 1.4rem; }
}

/* ---------- Hero ---------- */
/* Phones: images/hero.jpg (portrait). Desktop: images/hero-wide.jpg (landscape). */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.72) 45%, rgba(0, 0, 0, 0.94) 100%),
    url("images/hero.jpg") center top / cover no-repeat,
    #0a0a0a;
}
.hero-inner {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
  padding: 7.5rem 0 3.5rem;
}
.hero-title {
  font-family: "Inter Tight", "Instrument Sans", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(3.7rem, 14vw, 7.4rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: #ffffff;
}
.hero-title span { display: block; padding-bottom: 0.04em; }
.hero-title .grad {
  background: linear-gradient(90deg, #3cc29e 0%, #b8f0dc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-title .muted { font-style: italic; color: rgba(255, 255, 255, 0.26); }

.hero-rule {
  width: 10rem;
  margin: 2.25rem 0 1.75rem;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
}
.hero .lead {
  max-width: 32rem;
  font-size: clamp(1.02rem, 2.4vw, 1.15rem);
  color: rgba(255, 255, 255, 0.68);
}
.hero .lead-strong {
  margin-top: 0.4rem;
  font-weight: 600;
  font-size: clamp(1.02rem, 2.4vw, 1.15rem);
  color: #ffffff;
}
.hero-actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}
.btn-hero { background: #ffffff; border-color: #ffffff; color: #000000; }
.btn-hero:hover { background: #3cc29e; border-color: #3cc29e; }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, 0.6); color: #ffffff; }
.btn-ghost:hover { background: #ffffff; color: #000000; }

@media (max-width: 600px) {
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; padding: 1.05rem 1.4rem; }
}

@media (min-width: 861px) {
  .hero {
    background:
      linear-gradient(90deg, #000000 0%, rgba(0, 0, 0, 0.92) 30%, rgba(0, 0, 0, 0.5) 55%, rgba(0, 0, 0, 0.05) 85%),
      linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 25%),
      url("images/hero-wide.jpg") right center / cover no-repeat,
      #000000;
  }
  .hero-inner { padding: 8rem 0 5rem; }
}

/* ---------- Chart (in "How I trade") ---------- */
.approach-top {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  margin-bottom: 3.5rem;
}
.approach-top .block-intro { margin-bottom: 0; }
@media (max-width: 860px) { .approach-top { grid-template-columns: 1fr; } }

.chart-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.25rem 1.25rem 0.75rem;
}
.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}
.chart-head strong { color: var(--ink); font-weight: 600; }
.chart-caption {
  font-size: 0.9rem;
  color: var(--ink-soft);
  padding: 0.5rem 0 0.25rem;
}
#chart text { font-family: "Instrument Sans", system-ui, sans-serif; }
.candle-late { opacity: 0; }
.chart-ready .candle-late { animation: appear .25s ease-out forwards; }
.hit-label { opacity: 0; }
.chart-ready .hit-label { animation: appear .4s ease-out forwards; }
@keyframes appear { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .candle-late, .hit-label { opacity: 1; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Sections ---------- */
section.block { scroll-margin-top: 4.25rem; padding: clamp(3.5rem, 8vw, 6rem) 0; border-top: 1px solid var(--line); }
.block-intro { max-width: 40rem; margin-bottom: 2.5rem; }
.block-intro p { margin-top: 1rem; color: var(--ink-soft); font-size: 1.125rem; }

/* Approach */
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}
.principle { border-top: 3px solid var(--ink); padding-top: 1.25rem; }
.principle p { margin-top: 0.6rem; color: var(--ink-soft); }
@media (max-width: 860px) { .principles { grid-template-columns: 1fr; gap: 2rem; } }

/* Broker */
.broker {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.reasons { list-style: none; padding: 0; margin: 0; }
.reasons li {
  padding: 1rem 0 1rem 2rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.reasons li:first-child { border-top: 1px solid var(--line); }
.reasons li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 1.45rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 2px;
  background: var(--tp);
}
.broker-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2rem;
}
.broker-panel h3 { font-size: 1.6rem; font-weight: 700; }
.broker-panel .btn { margin-top: 1.5rem; width: 100%; }
.disclosure {
  margin-top: 1.25rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
@media (max-width: 860px) { .broker { grid-template-columns: 1fr; } }

/* Course */
.course-list {
  list-style: none;
  counter-reset: lesson;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 3rem;
}
.course-list li {
  counter-increment: lesson;
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  align-items: baseline;
  gap: 0.75rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.course-list li::before {
  content: counter(lesson);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.course-list .title { font-weight: 600; }
.course-list .desc { display: block; font-weight: 400; color: var(--ink-soft); font-size: 0.95rem; }
.status {
  font-size: 0.85rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
.course-cta { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.course-cta p { color: var(--ink-soft); margin-right: 0.5rem; }
@media (max-width: 760px) { .course-list { grid-template-columns: 1fr; } }

/* Follow */
.follow {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}
.follow p { margin-top: 0.75rem; color: var(--ink-soft); max-width: 32rem; }
.follow-links { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
footer .risk { max-width: 52rem; }
footer .risk strong { color: var(--ink); }
footer .copy { margin-top: 1.25rem; }
