/* ==========================================================================
   KW Foundry — styles
   ========================================================================== */

:root {
  --ink: #14110f;
  --ink-2: #2a2521;
  --muted: #6b635b;
  --line: #e7e0d6;
  --paper: #faf7f2;
  --card: #ffffff;
  --ember: #e8622c;
  --ember-deep: #c44a18;
  --ember-soft: #fde9dd;
  --gold: #f2b544;

  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Manrope", "DM Sans", system-ui, sans-serif;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(20, 17, 15, 0.04), 0 12px 32px -12px rgba(20, 17, 15, 0.18);
  --shadow-lg: 0 2px 4px rgba(20, 17, 15, 0.04), 0 30px 60px -20px rgba(20, 17, 15, 0.28);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0;
}

p { margin: 0; }

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1160px, 100% - 40px);
  margin-inline: auto;
}

/* ---------- Buttons & links ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 26px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  transition: transform 0.2s var(--ease), background 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 20px -8px rgba(20, 17, 15, 0.5);
  white-space: nowrap;
}

.button:hover {
  background: var(--ember);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -10px rgba(232, 98, 44, 0.7);
}

.button-small {
  padding: 10px 18px;
  font-size: 14px;
}

.button-light {
  background: #fff;
  color: var(--ink);
}

.button-light:hover {
  background: var(--ink);
  color: #fff;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--ink);
}

.text-link span {
  transition: transform 0.2s var(--ease);
}

.text-link:hover {
  color: var(--ember-deep);
}

.text-link:hover span {
  transform: translateX(4px);
}

:focus-visible {
  outline: 3px solid var(--ember);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Eyebrow ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ember-deep);
  margin-bottom: 18px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.eyebrow-light {
  color: var(--gold);
}

/* ---------- Nav ---------- */

.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.75);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.nav-wrap.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px -18px rgba(20, 17, 15, 0.4);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--ember), var(--ember-deep));
  color: #fff;
  font-size: 14px;
  letter-spacing: 0;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.15);
}

.nav-links {
  display: flex;
  gap: 34px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
}

.nav-links a {
  position: relative;
  padding: 6px 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--ember);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 96px 0 110px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.55;
}

.hero-glow-one {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #ffb489, transparent 70%);
  top: -160px;
  right: -80px;
}

.hero-glow-two {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, #ffe0a3, transparent 70%);
  bottom: -200px;
  left: -120px;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(44px, 6.4vw, 80px);
  font-weight: 800;
  margin-bottom: 26px;
}

.hero h1 span {
  background: linear-gradient(100deg, var(--ember) 10%, var(--ember-deep) 60%, #9c3a12);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-text {
  font-size: 20px;
  color: var(--muted);
  max-width: 540px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  margin-bottom: 56px;
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  max-width: 560px;
}

.hero-proof div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-proof strong {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ember);
}

.hero-proof span {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  line-height: 1.35;
}

/* Hero card */

.hero-card {
  background: var(--card);
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: rotate(1.2deg);
  transition: transform 0.5s var(--ease);
}

.hero-card:hover {
  transform: rotate(0deg) translateY(-4px);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 18px;
  background: #f4efe8;
  border-bottom: 1px solid var(--line);
}

.window-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ddd3c6;
}

.window-bar span:nth-child(1) { background: #f28b6b; }
.window-bar span:nth-child(2) { background: #f2c25b; }
.window-bar span:nth-child(3) { background: #8fcf85; }

.window-bar small {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.card-content {
  padding: 30px 28px 32px;
}

.mini-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 8px;
}

.card-content h2 {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 22px;
}

.principle {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background 0.35s, border-color 0.35s, transform 0.35s var(--ease);
}

.principle + .principle {
  margin-top: 6px;
}

.principle.active {
  background: var(--ember-soft);
  border-color: #f8cdb3;
  transform: translateX(4px);
}

.principle-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f4efe8;
  font-size: 18px;
  color: var(--ink-2);
  transition: background 0.35s, color 0.35s;
}

.principle.active .principle-icon {
  background: var(--ember);
  color: #fff;
}

.principle strong {
  display: block;
  font-size: 16px;
}

.principle small {
  display: block;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Ticker ---------- */

.ticker {
  background: var(--ink);
  color: #fff;
  overflow: hidden;
  padding: 20px 0;
  transform: rotate(-1deg);
  margin: 0 -20px;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 32s linear infinite;
}

.ticker-track > div {
  flex: none;
  padding-right: 22px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.ticker-track span {
  color: var(--ember);
  margin: 0 18px;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Sections ---------- */

.section {
  padding: 120px 0;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 60px;
}

.section-heading h2 {
  font-size: clamp(36px, 4.6vw, 56px);
  font-weight: 800;
}

.section-heading p {
  font-size: 18px;
  color: var(--muted);
  max-width: 460px;
  justify-self: end;
}

/* ---------- Ventures ---------- */

.venture-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 22px;
}

.venture-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}

.venture-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.venture-card-primary {
  background: linear-gradient(160deg, #fff4ec 0%, #ffffff 55%);
  border-color: #f6d3bd;
}

.venture-card-idea {
  background: transparent;
  border: 2px dashed #d8cdbf;
  box-shadow: none;
}

.venture-card-idea:hover {
  border-color: var(--ember);
  box-shadow: none;
}

.venture-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 34px;
}

.tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--ember);
  color: #fff;
}

.tag-dark {
  background: var(--ink);
}

.tag-outline {
  background: transparent;
  color: var(--ink-2);
  border: 1.5px solid var(--ink-2);
}

.venture-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: #c9bdaf;
}

.venture-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  font-size: 28px;
  background: var(--ember);
  color: #fff;
  margin-bottom: 26px;
  box-shadow: 0 10px 20px -10px rgba(232, 98, 44, 0.8);
}

.venture-icon.dark {
  background: var(--ink);
  box-shadow: 0 10px 20px -10px rgba(20, 17, 15, 0.7);
}

.venture-icon.outline {
  background: transparent;
  color: var(--ink-2);
  border: 2px dashed #c9bdaf;
  box-shadow: none;
}

.venture-card h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 14px;
}

.venture-card p {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 26px;
}

.venture-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.venture-meta span {
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  background: #f4efe8;
  color: var(--ink-2);
}

.venture-card-idea .text-link {
  margin-top: auto;
}

/* ---------- Dark section ---------- */

.section-dark {
  background: var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.section-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at top right, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at top right, #000 20%, transparent 70%);
  pointer-events: none;
}

.section-dark .container {
  position: relative;
}

.section-heading.inverse p {
  color: #b5aca3;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 30px 26px 34px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: background 0.3s, border-color 0.3s, transform 0.35s var(--ease);
}

.step:hover {
  background: rgba(232, 98, 44, 0.1);
  border-color: rgba(232, 98, 44, 0.45);
  transform: translateY(-4px);
}

.step-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 44px;
  line-height: 1;
  margin-bottom: 28px;
  background: linear-gradient(180deg, var(--ember), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.step h3 {
  font-size: 21px;
  margin-bottom: 12px;
}

.step p {
  font-size: 15px;
  color: #b5aca3;
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}

.about h2 {
  font-size: clamp(34px, 4.2vw, 52px);
  font-weight: 800;
}

.about-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 18px;
  color: var(--ink-2);
  padding-top: 38px;
}

.about-copy p:last-child {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  color: var(--ember-deep);
  padding-left: 18px;
  border-left: 3px solid var(--ember);
}

/* ---------- Contact ---------- */

.contact-section {
  padding-top: 0;
}

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 64px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 90% 10%, rgba(242, 181, 68, 0.35), transparent 45%),
    linear-gradient(135deg, var(--ember) 0%, var(--ember-deep) 100%);
  color: #fff;
  box-shadow: 0 30px 60px -30px rgba(196, 74, 24, 0.8);
}

.contact-card .eyebrow {
  color: #ffe3c4;
}

.contact-card h2 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  margin-bottom: 14px;
}

.contact-card p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 520px;
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  font-size: 14px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-footer {
  font-size: 16px;
  color: var(--ink);
}

.brand-footer .brand-mark {
  width: 32px;
  height: 32px;
  font-size: 12px;
  border-radius: 9px;
}

footer .text-link {
  font-size: 14px;
}

/* ---------- Reveal animation (enabled by JS) ---------- */

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

.js .reveal.in {
  opacity: 1;
  transform: none;
}

.js .hero-card.reveal.in {
  transform: rotate(1.2deg);
}

.js .hero-card.reveal.in:hover {
  transform: rotate(0deg) translateY(-4px);
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .hero-grid,
  .section-heading,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid { gap: 56px; }
  .hero-card { max-width: 520px; }
  .section-heading { gap: 20px; }
  .section-heading p { justify-self: start; }
  .about-grid { gap: 20px; }
  .about-copy { padding-top: 0; }

  .venture-grid { grid-template-columns: 1fr 1fr; }
  .venture-card-primary { grid-column: 1 / -1; }

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

  .contact-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 48px;
  }
}

@media (max-width: 720px) {
  body { font-size: 16px; }

  .container { width: calc(100% - 32px); }

  .nav-links { display: none; }

  .hero { padding: 64px 0 80px; }
  .hero-text { font-size: 18px; }
  .hero-actions { gap: 20px; margin-bottom: 40px; }
  .hero-proof { grid-template-columns: 1fr; gap: 14px; }
  .hero-proof div { flex-direction: row; gap: 12px; align-items: baseline; }
  .hero-card { transform: none; }
  .js .hero-card.reveal.in { transform: none; }

  .section { padding: 80px 0; }
  .contact-section { padding-top: 0; }
  .section-heading { margin-bottom: 40px; }

  .venture-grid,
  .steps { grid-template-columns: 1fr; }

  .ticker-track > div { font-size: 17px; }

  .contact-card {
    padding: 36px 26px;
    border-radius: 22px;
  }

  .contact-card .button {
    width: 100%;
    white-space: normal;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
