/* ==========================================================================
   HOME PAGE STYLES
   Save as css/home.css. It loads after style.css, so it wins any clash.
   ========================================================================== */

/* ---------- HERO: layout reset + split layout ---------- */

/* The hero fills the screen below the sticky header, so the next section
   only appears when you scroll. Content is centred vertically and stays on
   the same left edge as the logo and nav. */
.hero {
  --header-h: 89px;                              /* desktop header height */
  --strip-h: 52px;                               /* height of the yellow industries strip */
  display: flex; align-items: center;
  /* leaves room so the yellow strip sits at the bottom of the first screen */
  min-height: calc(100vh - var(--header-h) - var(--strip-h));
  min-height: calc(100svh - var(--header-h) - var(--strip-h));    /* phones: ignores the address bar */
}
.hero > .container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
@media (min-width: 769px) { .hero { padding: 6rem 0 5.5rem; } }
@media (max-width: 768px) { .hero { --header-h: 77px; } }  /* phone header height */

.hero-split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 3rem; align-items: center; }
.hero-split h1 { max-width: none; font-size: clamp(2.2rem, 3.4vw, 3rem); }

.hero-points { display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; margin-top: 2rem; }
.hero-points li { display: flex; align-items: center; gap: 0.55rem; font-size: 0.9rem; font-weight: 600; color: #c7d2e3; }
.hero-points li::before {
  content: ""; flex: none; width: 9px; height: 9px; background: var(--color-gold);
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
}

/* ---------- HERO: sample label that "prints" ---------- */
.hero-visual { display: grid; place-items: center; padding: 1.5rem 1rem; }

.code-card {
  position: relative; width: min(380px, 100%); padding: 1.6rem 1.6rem 1.4rem;
  background: var(--color-white); border-top: 4px solid var(--color-gold); border-radius: var(--radius);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  transform: rotate(-3deg);
  animation: card-float 7s ease-in-out infinite;
}
.code-card::after {
  content: "\2713"; position: absolute; top: -26px; right: -22px;
  width: 58px; height: 64px; display: grid; place-items: center;
  background: var(--color-gold); color: var(--color-navy); font: 700 1.4rem var(--font-body);
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
}
.code-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem;
  font: 600 0.7rem var(--font-body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-grey-text);
}
.code-status { display: flex; align-items: center; gap: 0.45rem; color: var(--color-navy); }
.code-status::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-gold); animation: dot-pulse 1.6s ease-in-out infinite;
}
.code-lines { display: grid; gap: 0.7rem; }
.code-lines div {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding-bottom: 0.55rem; border-bottom: 1px dashed #d5d9e2;
}
.code-lines dt { font-size: 0.72rem; letter-spacing: 0.12em; color: var(--color-grey-text); }
.code-lines dd {
  font-size: 1.15rem; font-weight: 700; letter-spacing: 0.04em; color: var(--color-navy);
  animation: code-print 0.9s steps(12, end) backwards;
}
.code-lines div:nth-child(1) dd { animation-delay: 0.9s; }
.code-lines div:nth-child(2) dd { animation-delay: 1.5s; }
.code-lines div:nth-child(3) dd { animation-delay: 2.1s; }
.barcode {
  height: 52px; margin-top: 1.25rem;
  background:
    repeating-linear-gradient(90deg, var(--color-navy) 0 2px, transparent 2px 7px, var(--color-navy) 7px 8px, transparent 8px 13px),
    repeating-linear-gradient(90deg, transparent 0 4px, var(--color-navy) 4px 7px, transparent 7px 17px, var(--color-navy) 17px 18px, transparent 18px 29px);
}

/* both ends are shapes, so the browser can animate between them smoothly */
@keyframes code-print {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes card-float {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50%      { transform: rotate(-3deg) translateY(-10px); }
}
@keyframes dot-pulse { 50% { opacity: 0.3; } }

@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; }
}
/* Phones: the label sits between the paragraph and the buttons, kept compact
   so the yellow strip stays close to the first screen. The three points are hidden. */
@media (max-width: 700px) {
  .hero { padding-top: 3rem; padding-bottom: 2.25rem; }

  /* Re-order the hero: eyebrow, headline, paragraph, label, buttons */
  .hero-split { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .hero-copy { display: contents; }
  .hero-copy > .eyebrow { order: 1; }
  .hero-copy > h1 { order: 2; }
  .hero-copy > p { order: 3; }
  .hero-visual { order: 4; padding: 1.5rem 0 0.75rem; }
  .hero-copy > .hero-actions { order: 5; margin-top: 0.75rem; flex-wrap: nowrap; gap: 0.75rem; }
  

  /* Side-by-side buttons save height */
  .hero-actions .btn { flex: 1; width: auto; padding: 0.8rem 0.5rem; white-space: nowrap; text-align: center; }

  /* Compact label */
  .code-card { width: min(310px, calc(100% - 32px)); padding: 0.9rem 1.1rem 0.8rem; }
  .code-card::after { top: -16px; right: -8px; width: 42px; height: 48px; font-size: 1.05rem; }
  .code-head { margin-bottom: 0.6rem; padding-right: 1.5rem; }
  .code-lines { gap: 0.4rem; }
  .code-lines div { padding-bottom: 0.3rem; }
  .code-lines dd { font-size: 1rem; line-height: 1.3; }
  .barcode { display: none; }

  /* Keep the staggered fade-in now that the copy block is flattened */
  .hero-copy > * { animation: fade-up 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
  .hero-copy > :nth-child(1) { animation-delay: 0.1s; }
  .hero-copy > :nth-child(2) { animation-delay: 0.2s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.3s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.45s; }
}

/* ---------- HOW IT WORKS ---------- */
.steps {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 2rem; margin-top: 3rem;
}
.steps li { position: relative; }
.step-num {
  display: grid; place-items: center; width: 52px; height: 58px; margin-bottom: 1.25rem;
  background: var(--color-navy); color: var(--color-gold);
  font: 700 1.15rem var(--font-heading);
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
}
/* dashed connector from one hexagon to the next */
.steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 29px; left: 68px;
  width: calc(100% + 2rem - 84px); border-top: 2px dashed #c3cad8;
}
.steps h3 { margin-bottom: 0.4rem; }
.steps p { font-size: 0.95rem; }

@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 2rem; }
  .steps li::after { display: none; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- WHY MARCPROTECH ---------- */
.why { background: var(--color-navy); }
.why .eyebrow { color: var(--color-gold); }
.why h2, .why h3 { color: var(--color-white); }
.why p { color: #c7d2e3; }
.why :focus-visible { outline-color: var(--color-gold); }
.why-layout { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 4rem; align-items: start; }
.why-layout .btn { margin-top: 2rem; }
.why-points { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.25rem 2.5rem; }
.why-point h3 { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.5rem; }
.why-point h3::before {
  content: ""; flex: none; width: 12px; height: 12px; background: var(--color-gold);
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
}
.why-point p { font-size: 0.95rem; }
@media (max-width: 900px) { .why-layout { grid-template-columns: 1fr; gap: 2.5rem; } }
@media (max-width: 560px) { .why-points { grid-template-columns: 1fr; } }

/* ---------- CALL TO ACTION ---------- */
.cta-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 0.8rem; }
.cta-alt { font-size: 0.92rem; font-weight: 600; color: var(--color-navy); }
.cta-alt a { text-decoration: underline; text-underline-offset: 3px; }
.cta-alt a:hover { text-decoration-thickness: 2px; }
@media (max-width: 768px) {
  .cta-actions { width: 100%; align-items: stretch; }
  .cta-actions .btn { text-align: center; }
}

/* No white gap between the gold call-to-action and the footer on this page */
body[data-page="home"] .site-footer { margin-top: 0; }
@media (max-width: 700px) {

  /* Give the hero content more breathing room */
  .hero-split {
    gap: 0;
    padding-top: 2rem;
    padding-bottom: 2.5rem;
  }

  /* Space between headline and description */
  .hero-split h1 {
    line-height: 1.2;
    margin-bottom: 1.2rem;
  }

  .hero-copy p {
    line-height: 1.7;
    margin-bottom: 0;
  }

  /* Move the coding label lower */
  .hero-visual {
    margin-top: 2rem;
    margin-bottom: 0;
  }

  /* Push the buttons further down */
  .hero-actions {
    margin-top: 2rem;
    gap: 12px;
  }

  /* Keep buttons nicely aligned */
  .hero-actions .btn {
    min-height: 50px;
  }
}
/* =========================================
   MOBILE HOMEPAGE — COMPACT FIRST SCREEN
   ========================================= */

@media (max-width: 480px) {

  /* Hero section */
.hero {
  min-height: calc(100svh - 77px - 42px);
  min-height: calc(100dvh - 77px - 42px);
  height: auto;
  box-sizing: border-box;
  padding: 12px 0;
  display: flex;
  align-items: center;
}
  /* Hero layout */
  .hero-split {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
  }

  /* Eyebrow */
  .hero-copy > .eyebrow {
    margin-bottom: 8px;
    font-size: 0.7rem;
  }

  /* Main heading */
  .hero-split h1 {
    font-size: clamp(1.9rem, 8vw, 2.2rem);
    line-height: 1.08;
    margin-bottom: 12px;
  }

  /* Description */
  .hero-copy > p {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 0;
  }

  /* Coding sample */
  .hero-visual {
    padding: 48px 0 0;
    margin: 0;
  }

  .code-card {
    width: min(290px, calc(100% - 30px));
    padding: 0.75rem 1rem;
  }

  .code-card::after {
    width: 38px;
    height: 44px;
    top: -13px;
    right: -7px;
  }

  .code-head {
    margin-bottom: 8px;
  }

  .code-lines {
    gap: 5px;
  }

  .code-lines div {
    padding-bottom: 4px;
  }

  .code-lines dd {
    font-size: 0.9rem;
  }

  .barcode {
    display: none;
  }

  /* Buttons */
  .hero-copy > .hero-actions {
    margin-top: 82px;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .hero-actions .btn {
    flex: 1;
    min-height: 44px;
    padding: 0.65rem 0.35rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  /* Industries marquee */
  .marquee {
    display: block;
    width: 100%;
    height: auto;
    min-height: 42px;
    margin: 0;
    overflow: hidden;
  }

  .marquee-track {
    display: flex;
    width: max-content;
    align-items: center;
  }
}