@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/plus-jakarta-sans.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --white: #ffffff;
  --panel: #f3f7fb;
  --sky: #e3eefa;
  --blue: #1f5faf;
  --navy: #0e2a52;
  --text: #1a2433;
  --muted: #4a5668;
  --green: #12784a;
  --mint: #7be3b3;
  --line: #d9e3ee;
  --shadow-soft: 0 1px 2px rgba(14, 42, 82, 0.05), 0 8px 24px rgba(14, 42, 82, 0.07);
  --shadow-lift: 0 2px 4px rgba(14, 42, 82, 0.06), 0 18px 40px rgba(14, 42, 82, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin: 0;
  overflow-wrap: break-word;
}

h2 {
  color: var(--navy);
  font-size: clamp(2rem, 1.5rem + 2.4vw, 3.25rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  max-width: 20ch;
}

h3 {
  font-size: 1.3rem;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--blue);
  text-underline-offset: 0.18em;
}

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

.wrap {
  margin: 0 auto;
  max-width: 1160px;
  padding: 0 1.5rem;
}

.section {
  padding: clamp(4rem, 3rem + 5vw, 7.5rem) 0;
  scroll-margin-top: 0;
}

.tinted {
  background: var(--panel);
}

.eyebrow {
  align-items: center;
  color: var(--green);
  display: flex;
  font-size: 0.875rem;
  font-weight: 800;
  gap: 0.6rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.9rem;
  text-transform: uppercase;
}

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

.intro {
  color: var(--muted);
  font-size: 1.15rem;
  margin-bottom: 2.5rem;
  max-width: 46rem;
}

.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Text still waiting for content: quiet, but easy to spot */
.placeholder {
  overflow-wrap: anywhere;
  text-decoration: underline dashed rgba(127, 143, 163, 0.9) 2px;
  text-underline-offset: 0.25em;
}

/* Entrance animation */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

/* Hero */
.hero {
  align-items: flex-start;
  background:
    radial-gradient(60rem 40rem at 90% -10%, rgba(64, 140, 230, 0.55), transparent 65%),
    radial-gradient(40rem 30rem at 0% 110%, rgba(38, 170, 120, 0.28), transparent 60%),
    var(--navy);
  border-radius: 0 0 clamp(24px, 4vw, 48px) clamp(24px, 4vw, 48px);
  color: var(--white);
  display: flex;
  min-height: 92vh;
  min-height: 92svh;
  overflow: hidden;
  /* On phones the bottom padding keeps the artwork clear of the text */
  padding: 3.5rem 0 56vw;
  position: relative;
}

.hero-art {
  bottom: -9vw;
  height: auto;
  opacity: 0.85;
  position: absolute;
  right: -12vw;
  width: 66vw;
}

.ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.28);
  stroke-width: 1.5;
}

.cross {
  fill: rgba(255, 255, 255, 0.92);
}

.leaf {
  fill: var(--mint);
}

.dot {
  fill: var(--mint);
}

.hero-content {
  position: relative;
  width: 100%;
}

.hero .eyebrow {
  color: var(--mint);
}

.hero h1 {
  font-size: clamp(2.75rem, 1.6rem + 5.6vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin-bottom: 1.5rem;
  max-width: 15ch;
}

.hero h1.placeholder {
  font-size: clamp(2.25rem, 1.6rem + 3vw, 4rem);
}

.hero-subheading {
  font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.6rem);
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 1rem;
  max-width: 34rem;
}

.hero-why {
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 2.25rem;
  max-width: 34rem;
}

.scroll-cue {
  align-items: center;
  background: var(--white);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  color: var(--navy);
  display: inline-flex;
  font-weight: 700;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.7rem 1.6rem;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero-actions .scroll-cue {
  flex: 1 1 auto;
  justify-content: center;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.hero-actions .scroll-cue:first-child {
  flex-basis: 100%;
}

.scroll-cue.secondary {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.75);
  box-shadow: none;
  color: var(--white);
}

.scroll-cue svg {
  animation: nudge 1.8s ease-in-out infinite;
  color: var(--green);
}

@keyframes nudge {
  50% {
    transform: translateY(4px);
  }
}

.hero :focus-visible {
  outline-color: var(--white);
}

/* Why it matters */
.split {
  display: grid;
  gap: 1.5rem;
}

.lead {
  font-size: clamp(1.2rem, 1.1rem + 0.6vw, 1.5rem);
  font-weight: 500;
  line-height: 1.5;
}

.lead p:last-child {
  margin-bottom: 0;
}

/* Fact cards: always fill the row, however many facts there are */
.facts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.fact {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  flex: 1 1 280px;
  padding: 2rem;
}

.fact:first-child {
  background: linear-gradient(145deg, var(--blue), var(--navy));
  color: var(--white);
}

.fact-number {
  color: var(--blue);
  display: block;
  font-size: clamp(3rem, 2.4rem + 2.6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 0.75rem;
  overflow-wrap: break-word;
}

.fact-number.placeholder {
  font-size: 1.6rem;
  letter-spacing: -0.01em;
}

.fact:first-child .fact-number {
  color: var(--mint);
}

.fact p {
  font-weight: 500;
  margin: 0;
}

/* Picture cards */
.grid-3 {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  margin-top: 2.5rem;
}

.picture-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: box-shadow 0.25s ease, opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.picture-card figure {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.picture-frame {
  aspect-ratio: 4 / 3;
  flex: 1 1 auto;
  overflow: hidden;
}

.picture-frame img {
  display: block;
  height: 100%;
  /* Shows the whole photo, so tall product shots are not cut off */
  object-fit: contain;
  transition: transform 0.5s ease;
  width: 100%;
}

.image-box {
  align-items: center;
  background:
    radial-gradient(circle at 1px 1px, rgba(31, 95, 175, 0.2) 1.5px, transparent 0) 0 0 / 18px 18px,
    linear-gradient(135deg, var(--sky), #eef8f3);
  color: var(--navy);
  display: flex;
  font-weight: 600;
  height: 100%;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
}

.picture-card figcaption {
  background: var(--panel);
  padding: 0.7rem 1.5rem;
}

.image-name {
  display: block;
  font-size: 1rem;
  font-weight: 700;
}

.image-credit {
  color: var(--muted);
  display: block;
  font-size: 1rem;
}

.card-body {
  padding: 1.5rem;
}

.card-body h3 {
  color: var(--navy);
  margin-bottom: 0.6rem;
}

.card-body p {
  margin: 0;
}

/* Machines and equipment */
.dark {
  background:
    radial-gradient(50rem 30rem at 100% 0%, rgba(64, 140, 230, 0.4), transparent 65%),
    var(--navy);
  color: var(--white);
}

.dark h2 {
  color: var(--white);
}

.dark .eyebrow {
  color: var(--mint);
}

.dark :focus-visible {
  outline-color: var(--white);
}

.dark .picture-card :focus-visible {
  outline-color: var(--blue);
}

.features {
  display: grid;
  gap: 1.75rem;
}

.features .picture-card {
  border: 0;
  color: var(--text);
}

.features .card-body h3 {
  font-size: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
}

/* Calculator */
.calculator {
  background: var(--white);
  border-radius: clamp(22px, 3vw, 32px);
  box-shadow: var(--shadow-lift);
  display: grid;
  overflow: hidden;
}

.calc-form {
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
}

.calculator label {
  color: var(--navy);
  display: block;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.6rem;
}

.calculator select,
.calculator input {
  background-color: var(--panel);
  border: 2px solid #7f8fa3;
  border-radius: 14px;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  margin-bottom: 1.5rem;
  min-height: 58px;
  padding: 0.5rem 1rem;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  width: 100%;
}

.calculator select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%231f5faf' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 0.9rem center;
  background-repeat: no-repeat;
  background-size: 22px;
  padding-right: 3rem;
}

.calculator input {
  font-size: 1.5rem;
}

.calculator select:hover,
.calculator input:hover,
.calculator select:focus,
.calculator input:focus {
  background-color: var(--white);
  border-color: var(--blue);
}

.calc-status {
  color: var(--muted);
  margin: 0;
  min-height: 1.65em;
}

.calc-status.error {
  color: #a4261d;
  font-weight: 700;
}

.calc-results {
  background:
    radial-gradient(30rem 20rem at 100% 0%, rgba(64, 140, 230, 0.45), transparent 70%),
    var(--navy);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
}

.results {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.result-value {
  color: var(--mint);
  display: block;
  font-size: clamp(3.25rem, 2.6rem + 3vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.result-value.secondary {
  color: var(--white);
  font-size: clamp(2rem, 1.7rem + 1.4vw, 2.75rem);
}

.result-label {
  color: rgba(255, 255, 255, 0.88);
  display: block;
  font-weight: 500;
  margin-top: 0.25rem;
}

.comparison {
  background: rgba(123, 227, 179, 0.15);
  border-radius: 12px;
  color: var(--mint);
  font-weight: 700;
  margin: 0;
  padding: 0.7rem 1rem;
}

.calc-notes {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  line-height: 1.5;
  padding-top: 1.25rem;
}

.calc-notes p:last-child {
  margin-bottom: 0;
}

/* Questions: the most important part of the page */
.questions {
  background: linear-gradient(160deg, var(--blue), #17498a);
  color: var(--white);
}

.questions h2 {
  color: var(--white);
}

.questions .eyebrow {
  color: var(--mint);
}

.questions .intro {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
}

.question-list {
  display: grid;
  gap: 1.25rem;
}

.question {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(10, 30, 60, 0.25);
  color: var(--text);
  padding: clamp(1.5rem, 1.2rem + 1.4vw, 2.5rem);
}

.question-number {
  color: var(--blue);
  display: block;
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 1rem;
}

.question h3 {
  color: var(--navy);
  font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  font-weight: 800;
}

/* About */
.about-card {
  background: var(--panel);
  border-radius: clamp(22px, 3vw, 32px);
  margin: 0 auto;
  max-width: 820px;
  padding: clamp(2rem, 1.5rem + 3vw, 4rem);
}

.about-card h2 {
  font-size: clamp(1.75rem, 1.5rem + 1.2vw, 2.5rem);
  margin-bottom: 1rem;
}

.about-details {
  color: var(--blue);
  font-weight: 700;
}

.about-card p:last-child {
  margin-bottom: 0;
}

/* Footer */
.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  padding: 2.5rem 0;
}

.footer p {
  margin: 0;
  max-width: 54rem;
}

/* Phones: the whole calculator fits on one screen, sized for iPhone 14 and above */
@media (max-width: 639px) {
  #calculator {
    padding: 1.5rem 0 3rem;
  }

  #calculator .eyebrow {
    margin-bottom: 0.4rem;
  }

  #calculator h2 {
    font-size: 1.7rem;
    margin-bottom: 0.5rem;
    max-width: none;
  }

  #calculator .intro {
    font-size: 1rem;
    line-height: 1.45;
    margin-bottom: 0.9rem;
  }

  .calc-form {
    padding: 1.1rem 1.25rem 0.6rem;
  }

  .calculator label {
    margin-bottom: 0.45rem;
  }

  .calculator input {
    margin-bottom: 0.4rem;
    min-height: 50px;
  }

  .calc-results {
    padding: 1.1rem 1.25rem;
  }

  .results {
    gap: 0.9rem;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 0.8rem;
  }

  .result-value,
  .result-value.secondary {
    font-size: 2.1rem;
  }

  .result-label {
    line-height: 1.3;
  }

  .comparison {
    grid-column: 1 / -1;
  }

  .calc-notes {
    line-height: 1.4;
    padding-top: 0.75rem;
  }
}

/* Counter of content still to fill: disappears when everything is done */
.fill-counter {
  background: #fff3c4;
  border: 1px solid #b58900;
  border-radius: 14px;
  bottom: 0.75rem;
  box-shadow: var(--shadow-soft);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  max-width: min(22rem, calc(100vw - 1.5rem));
  padding: 0.4rem 0.8rem;
  position: fixed;
  right: 0.75rem;
  z-index: 10;
}

.fill-counter summary {
  cursor: pointer;
}

.fill-counter ul {
  font-weight: 500;
  margin: 0.5rem 0 0.25rem;
  max-height: 45vh;
  overflow: auto;
  padding-left: 1.25rem;
}

/* Hover effects only on devices with a mouse, so they don't stick after a tap */
@media (hover: hover) {
  .scroll-cue:hover {
    transform: translateY(-2px);
  }

  .picture-card:hover {
    box-shadow: var(--shadow-lift);
  }

  .picture-card:hover .picture-frame img {
    transform: scale(1.04);
  }
}

/* Tablet and desktop */
@media (min-width: 640px) {
  .hero {
    align-items: center;
    padding: 4rem 0;
  }

  .hero-art {
    bottom: auto;
    right: -8%;
    top: 50%;
    transform: translateY(-50%);
    width: min(50vw, 680px);
  }

  .hero h1,
  .hero-subheading,
  .hero-why {
    max-width: 52%;
  }

  .hero-actions .scroll-cue,
  .hero-actions .scroll-cue:first-child {
    flex: 0 0 auto;
    padding-left: 1.4rem;
    padding-right: 1.4rem;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 860px) {
  .split {
    gap: 4rem;
    grid-template-columns: 5fr 7fr;
  }

  .features .picture-card {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
  }

  .features .picture-card:nth-child(even) figure {
    order: 2;
  }

  .features .card-body {
    align-self: center;
    padding: clamp(2rem, 4vw, 3.5rem);
  }

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

  .questions-layout {
    align-items: start;
    display: grid;
    gap: 4rem;
    grid-template-columns: 4fr 7fr;
  }

  .questions-heading {
    position: sticky;
    top: 3rem;
  }
}

@media (min-width: 1000px) {
  /* Cards share the row equally, however many there are */
  .grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .scroll-cue svg {
    animation: none;
  }

  .picture-frame img,
  .scroll-cue {
    transition: none;
  }
}
