/* =========================================================
   KITCHIN — MASTER STYLESHEET (TESLA-STYLE RESPONSIVE)
   ========================================================= */

/* ---------- ROOT VARIABLES ---------- */
:root {
  --orange: #EC5E27;
  --blue: #002E50;

  --bg: #F8F8F7;
  --bg-dark: #0f0f10;

  --text: #1D1D1F;
  --text-dark: #f2f2f2;

  --card-bg: #ffffff;
  --card-bg-dark: #1a1a1c;

  --nav-height: 88px;

  --muted: #6e6e73;
}

/* ---------- RESET ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Playfair Display", serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* =========================================================
   NAVIGATION
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 clamp(1.5rem, 6vw, 6rem);
  background: rgba(248,248,247,0.75);
  backdrop-filter: blur(14px);
  transition: box-shadow 0.3s ease;
}

.nav.scrolled {
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.nav-logo {
  font-size: 1.8rem;
  font-weight: 700;
}

.nav-menu a {
  margin-left: 2rem;
  text-decoration: none;
  color: var(--text);
}

.nav-menu a:hover {
  color: var(--orange);
}

.nav-cta {
  color: var(--orange);
  font-weight: 600;
}

/* =========================================================
   SECTIONS
   ========================================================= */
section {
  padding: clamp(4rem, 8vw, 8rem) clamp(1.5rem, 6vw, 6rem);
  scroll-margin-top: var(--nav-height);
}

.section-content {
  max-width: 1400px;
  margin: auto;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  min-height: calc(100vh - var(--nav-height));
  background: var(--orange);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 6.5rem);
  line-height: 1.05;
}

.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  margin-top: 1.5rem;
  opacity: 0.95;
}

.primary-btn {
  margin-top: 3rem;
  display: inline-block;
  padding: 0.9rem 2.4rem;
  background: var(--blue);
  color: white;
  text-decoration: none;
  border-radius: 32px;
  transition: transform 0.3s ease;
}

.primary-btn:hover {
  transform: scale(1.05);
}

/* =========================================================
   CANADIAN GROCERY CRISIS
   ========================================================= */
.crisis-scale {
  text-align: center;
}

.crisis-scale h1 {
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 2rem;
}

.crisis-intro {
  max-width: 900px;
  margin: 0 auto 4rem;
  font-size: 1.25rem;
  opacity: 0.9;
}

.crisis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(2rem, 4vw, 4rem);
}

.crisis-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}

@media (hover: hover) {
  .crisis-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.16);
  }
}

.crisis-number {
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 700;
  color: var(--orange);
}

.crisis-title {
  margin-top: 1rem;
  font-size: 1.35rem;
  font-weight: 600;
}

.crisis-desc {
  margin-top: 1rem;
  opacity: 0.85;
}

/* =========================================================
   FADE-IN
   ========================================================= */
.fade-in {
  opacity: 0;
}

.fade-in.visible {
  animation: fadeUp 0.9s ease-out forwards;
}

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

/* =========================================================
   SCROLL SNAP
   ========================================================= */
@media (min-width: 768px) {
  html, body {
    height: 100%;
    scroll-snap-type: y proximity;
  }

  .hero, .crisis-scale {
    scroll-snap-align: start;
  }
}

/* =========================================================
   CRISIS CTA
   ========================================================= */
.crisis-cta-group {
  margin-top: 5rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.crisis-cta-group .primary-btn,
.crisis-cta-group .secondary-btn {
  display: inline-block;
  padding: 0.9rem 2.4rem;
  border-radius: 32px;
  text-decoration: none;
  font-weight: 600;
  background: var(--blue);
  color: #fff;
  border: none;
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}

.crisis-cta-group .primary-btn:hover,
.crisis-cta-group .secondary-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

/* =========================================================
   iSTACK + MOAT
   ========================================================= */
.iStack {
  background: var(--bg);
  padding: clamp(4rem, 8vw, 8rem) clamp(1.5rem, 6vw, 6rem);
  text-align: center;
}

.solution-intro {
  max-width: 900px;
  margin: 0 auto 4rem auto;
  font-size: 1.1rem;
  color: var(--text);
}

.istack-moat-system {
  display: grid;
  grid-template-columns: minmax(0,1fr) 2px minmax(0,1fr);
  gap: 6rem;
  align-items: start;
  max-width: 1400px;
  margin: auto;
}

.system-spine {
  width: 2px;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.18), transparent);
  margin: 0 2rem;
  border-radius: 1px;
}

/* iStack Cards */
.istack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: 2.5rem;
}

.istack-card {
  position: relative;
  padding: 2.5rem;
  border-radius: 18px;
  background: var(--card-bg);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  transition: transform 0.45s ease, box-shadow 0.45s ease;
  cursor: pointer;
}

.istack-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.16);
}

.istack-card__title {
  position: relative;
  z-index: 2;
  font-size: 1.35rem;
  font-weight: 600;
}

.istack-card__desc {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
}

.istack-card__overlay {
  position: absolute;
  inset: 0;
  padding: 1.5rem;
  background: rgba(0,0,0,0.85);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
  z-index: 10;
  border-radius: 18px;
}

.istack-card:hover .istack-card__overlay,
.istack-card__title:hover + .istack-card__overlay {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  box-shadow: 0 18px 40px rgba(0,0,0,0.16);
}

/* Vertical iStack */
.istack-vertical { display: flex; flex-direction: column; gap: 3.5rem; }

.istack-vertical__item {
  position: relative;
  padding-left: 2.5rem;
}

.istack-vertical__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
}

.istack-vertical__title { font-size:1.1rem; font-weight:600; margin-bottom:0.6rem; }
.istack-vertical__desc { font-size:0.95rem; color:var(--muted); line-height:1.5; }

/* Moat */
.moat { display:flex; flex-direction:column; gap:3.5rem; }
.moat-item { position:relative; padding-left:2.5rem; }
.moat-item::before { content:""; position:absolute; left:0; top:0.4rem; width:10px; height:10px; border-radius:50%; background:var(--blue);}
.moat-title { font-size:1.1rem; font-weight:600; margin-bottom:0.6rem; }
.moat-desc { font-size:0.95rem; color:var(--muted); line-height:1.5; }

/* =========================================================
   ADVANTAGE
   ========================================================= */
.advantage-system { display:flex; flex-direction:column; gap:4rem; max-width:1400px; margin:auto; align-items:center; justify-content:center; }
.advantage-column { width:100%; }
.advantage-grid { display:flex; flex-wrap:wrap; gap:1.5rem; margin-top:2rem; }
.advantage-card { flex:1 1 300px; max-width:100%; position:relative; background:var(--card-bg); border-radius:1rem; padding:1.5rem 1rem; text-align:center; cursor:pointer; overflow:hidden; transition:transform 0.35s ease, box-shadow 0.35s ease; }
.advantage-card:hover { transform:translateY(-10px); box-shadow:0 18px 40px rgba(0,0,0,0.16); }
.advantage-card__overlay { position:absolute; inset:0; padding:1rem; background:rgba(0,0,0,0.85); color:#fff; display:flex; align-items:center; justify-content:center; text-align:center; font-size:0.95rem; opacity:0; transform:translateY(20px); transition:opacity 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease; z-index:2; }
.advantage-card:hover .advantage-card__overlay,
.advantage-card__title:hover + .advantage-card__overlay { opacity:1; transform:translateY(0); box-shadow:0 18px 40px rgba(0,0,0,0.16);}
.advantage-card__title { font-family:'Playfair Display', serif; font-weight:600; position:relative; z-index:2; }

/* =========================================================
   ALBERTA — Animated Numbers
   ========================================================= */
.alberta { text-align:center; padding:clamp(4rem,8vw,8rem) clamp(1.5rem,6vw,6rem); }
.alberta h1, .alberta h2 { font-family:'Playfair Display', serif; margin-bottom:1rem; }

.interactive-text {
  display:inline-block;
  font-size:2rem;
  font-weight:600;
  color:var(--orange);
  margin:0 1rem;
  transition:transform 0.35s ease, color 0.35s ease;
}

.interactive-text::after {
  content:"";
  display:block;
  height:3px;
  background:var(--orange);
  transform:scaleX(0);
  transition:transform 0.3s ease;
  transform-origin:left;
}

.interactive-text:hover::after { transform:scaleX(1); }

/* Animated counter numbers */
@keyframes countUp {
  from { counter-increment: num 0; }
  to { counter-increment: num var(--target); }
}

/* =========================================================
   DARK MODE
   ========================================================= */
@media (prefers-color-scheme: dark) {
  body { background:var(--bg-dark); color:var(--text-dark); }
  .crisis-scale, .iStack, .advantage-system { background:var(--bg-dark); }
  .crisis-card, .istack-card, .advantage-card { background:var(--card-bg-dark); box-shadow:0 10px 30px rgba(0,0,0,0.5); }
  .crisis-intro, .crisis-desc, .solution-intro, .istack-card__desc, .istack-vertical__desc, .moat-desc, .advantage-card__overlay { opacity:0.85; }
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
body,h1,h2,h3,h4,h5,h6,p,a,li,span { font-family:'Playfair Display', serif; }
/* =========================================================
   GLOBAL HEADING SCALE — SINGLE SOURCE OF TRUTH
   ========================================================= */

h1 {
  font-size: clamp(3rem, 6vw, 5.5rem); /* same as Crisis title */
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem); /* same as iStack heading */
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.35rem); /* like descriptive subheads */
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
}



/* =========================================================
   ALBERTA CARDS
   ========================================================= */
.alberta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(2rem, 4vw, 4rem);
}

.alberta-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  transition: transform 0.45s ease, box-shadow 0.45s ease;
  cursor: default;
}

@media (hover: hover) {
  .alberta-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.16);
  }
}

.alberta-number {
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 1rem;
}

.alberta-title {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.alberta-desc {
  font-size: 1rem;
  opacity: 0.85;
}

/* Section Titles */
.section-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* responsive size */
  text-align: center; /* center horizontally */
  margin-bottom: 1rem;
  line-height: 1.1;
}

 .istack-scale {
  text-align: center;
}

.istack-scale h1 {
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 2rem;
}

 .advantage-scale {
  text-align: center;
}

 .Join-scale {
  text-align: center;
}

.Join-scale h1 {
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 2rem;
}

/* =========================================================
   UNIFIED HEADING SIZES
   ========================================================= */

/* H1 - All section main titles (like Crisis section) */
h1 {
  font-size: clamp(3rem, 6vw, 5.5rem); /* same as .crisis-scale h1 */
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 2rem;
  text-align: center; /* center all section titles */
}

/* H2 - Subtitles (like iStack section) */
h2 {
  font-size: clamp(1.35rem, 3vw, 2rem); /* same as .istack-card__title / section subtitle */
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1.2rem;
  text-align: center;
}

/* H3 - Smaller headings / descriptive lines (like 5 interlocking layers…) */
h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem); /* same as .istack-vertical__title / .moat-title */
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.8rem;
  text-align: center;
}

/* =========================================================
   JOIN / CONTACT SECTION
   ========================================================= */

.join {
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.02),
    rgba(0,0,0,0.04)
  );
  text-align: center;
}

.join-header {
  max-width: 900px;
  margin: 0 auto 3.5rem;
}

.join-subtitle {
  font-size: 1.15rem;
  opacity: 0.85;
  max-width: 720px;
  margin: 1.5rem auto 0;
}

/* Card container */
.join-card {
  max-width: 760px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: 20px;
  padding: clamp(2.5rem, 5vw, 3.5rem);
  box-shadow: 0 18px 40px rgba(0,0,0,0.14);
}

/* Grid for inputs */
.join-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Inputs */
.join input,
.join select,
.join textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.12);
  font-family: inherit;
  font-size: 1rem;
  background: transparent;
  transition: border 0.25s ease, box-shadow 0.25s ease;
}

.join textarea {
  margin-top: 1rem;
  resize: vertical;
}

.join input:focus,
.join select:focus,
.join textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(236,94,39,0.15);
}

/* Button */
.join-btn {
  margin-top: 2.5rem;
  width: 100%;
  font-size: 1.05rem;
  padding: 1rem 2.6rem;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .join {
    background: linear-gradient(
      to bottom,
      rgba(255,255,255,0.02),
      rgba(255,255,255,0.04)
    );
  }

  .join-card {
    background: var(--card-bg-dark);
    box-shadow: 0 18px 40px rgba(0,0,0,0.5);
  }

  .join input,
  .join select,
  .join textarea {
    border-color: rgba(255,255,255,0.18);
    color: var(--text-dark);
  }
}

/* =========================================================
   JOIN — SYSTEM-LED DESIGN
   ========================================================= */

.join-system {
  background: var(--bg);
}

.join-grid-system {
  display: grid;
  grid-template-columns: minmax(0,1fr) 2px minmax(0,1fr);
  gap: 6rem;
  align-items: start;
  max-width: 1400px;
  margin: auto;
}

/* Spine (same language as iStack) */
.join-spine {
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(0,0,0,0.2),
    transparent
  );
  border-radius: 1px;
}

/* LEFT */
.join-intent h1 {
  margin-bottom: 2rem;
}

.join-lead {
  font-size: 1.2rem;
  max-width: 520px;
  opacity: 0.9;
}

.join-paths {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.join-path {
  position: relative;
  padding-left: 2.5rem;
}

.join-path span {
  position: absolute;
  left: 0;
  top: 0.4rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
}

.join-path p {
  font-size: 1.05rem;
  opacity: 0.85;
}

/* RIGHT */
.join-form form {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.join-form input,
.join-form select,
.join-form textarea {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.15);
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
}

.join-form input:focus,
.join-form select:focus,
.join-form textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(236,94,39,0.15);
}

.join-form button {
  margin-top: 1.5rem;
}

/* Mobile */
@media (max-width: 900px) {
  .join-grid-system {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .join-spine {
    display: none;
  }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .join-system {
    background: var(--bg-dark);
  }

  .join-form input,
  .join-form select,
  .join-form textarea {
    border-color: rgba(255,255,255,0.2);
    color: var(--text-dark);
  }
}

.center-line {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 720px; /* keeps it elegant, not stretched */
}

/* Customer / Investor one-liners */
.advantage-column p,
.join-subtitle,
.solution-intro {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* Footer copyright */
footer,
footer p {
  text-align: center;
}

@media (min-width: 1024px) {
  html, body {
    scroll-snap-type: y proximity;
  }

  section {
    scroll-snap-align: start;
  }
}

.fade-in.visible {
  animation: fadeUp 1.15s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

p {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.join-system {
  position: relative;
}

.join-system::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 1px;
  background: rgba(0,0,0,0.15);
}
html, body {
  width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}
@media (max-width: 768px) {
  .nav {
    padding: 0 1.25rem;
  }

  .nav-menu {
    display: none; /* JS will toggle later */
  }
}
@media (max-width: 1024px) {
  .istack-moat-system {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .system-spine {
    display: none;
  }
}
