/* AllTerra Calculator — marketing landing (nestingcalculator.com)
   Navy / teal / white. No external fonts or CDNs. */

:root {
  --navy: #0e1828;
  --navy-mid: #1e2c42;
  --navy-soft: #2d3f5e;
  --teal: #4fc3cd;
  --teal-deep: #3a9fa8;
  --teal-soft: #a8dde2;
  --light: #f2f5f9;
  --card: #ffffff;
  --text: #1a2740;
  --muted: #637189;
  --on-dark: #dbe6f4;
  --on-dark-muted: #8ea0bd;
  --border: #e2e8f1;
  --line: rgba(168, 221, 226, 0.2);
  --focus: #4fc3cd;
  --radius: 2px;
  --shell: 1120px;
  --font-display: "Avenir Next", "Avenir", "Century Gothic", "Futura", "Gill Sans", "Trebuchet MS", sans-serif;
  --font-body: "Segoe UI", "Helvetica Neue", "Noto Sans", sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", "DejaVu Sans Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--light);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: #24727b;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--navy-mid);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.shell {
  width: min(100% - 2rem, var(--shell));
  margin-inline: auto;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-deep);
}

.eyebrow.on-dark {
  color: var(--teal-soft);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  color: var(--navy);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  color: var(--text);
  transition: background 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease);
}

.btn-primary {
  background: var(--teal-deep);
  border-color: var(--teal-deep);
  color: #fff;
}

.btn-primary:hover {
  background: #2e8a92;
  border-color: #2e8a92;
  color: #fff;
}

.btn-ghost {
  border-color: var(--border);
  background: var(--card);
  color: var(--navy-mid);
}

.btn-ghost:hover {
  border-color: var(--teal-deep);
  color: var(--navy);
}

.btn-ghost-light {
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.btn-ghost-light:hover {
  border-color: var(--teal-soft);
  color: var(--teal-soft);
}

.btn-lg {
  padding: 0.7rem 1.2rem;
}

.btn[aria-pressed="true"] {
  background: var(--navy-mid);
  border-color: var(--navy-mid);
  color: #fff;
}

/* Util bar */
.utilbar {
  background: var(--navy);
  color: var(--on-dark-muted);
  font-size: 0.8125rem;
}

.utilbar a {
  color: var(--on-dark);
  text-decoration: none;
}

.utilbar a:hover {
  color: var(--teal-soft);
}

.utilbar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  padding: 0.4rem 0;
}

.utilbar-left,
.utilbar-right {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}

.utilbar .hours strong {
  color: var(--on-dark);
  font-weight: 600;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(242, 245, 249, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.site-header.is-scrolled {
  box-shadow: 0 1px 0 rgba(14, 24, 40, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  min-height: 3.75rem;
}

@media (max-width: 959px) {
  .brand-by {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-product {
    font-size: 0.88rem;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--navy);
  margin-right: auto;
  min-width: 0;
  flex-shrink: 1;
}

.brand-mark {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
}

.brand-mark img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  max-width: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand-product {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

.brand-by {
  font-size: 0.72rem;
  color: var(--muted);
}

.nav {
  display: none;
  gap: 1.1rem;
}

.nav a {
  color: var(--navy-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav a:hover {
  color: var(--teal-deep);
}

.header-actions {
  display: none;
  align-items: center;
  gap: 0.55rem;
}

.header-phone {
  color: var(--navy-mid);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  margin-right: 0.25rem;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.lang-switch-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--card)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%233a4a63' d='M1 1l5 5 5-5'/%3E%3C/svg%3E")
    no-repeat right 0.55rem center / 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem 1.6rem 0.35rem 0.55rem;
  min-height: 2.25rem;
  cursor: pointer;
  max-width: 11rem;
}

.lang-switch-mobile {
  margin-bottom: 0.35rem;
}

.lang-switch-mobile .lang-select {
  width: 100%;
  max-width: none;
  font-size: 0.95rem;
  min-height: 2.5rem;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 1.1rem;
  height: 1.5px;
  margin-inline: auto;
  background: var(--navy);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem 1rem 1.1rem;
  border-top: 1px solid var(--border);
  background: var(--card);
}

.mobile-nav[hidden] {
  display: none !important;
}

.mobile-nav a:not(.btn) {
  color: var(--navy-mid);
  text-decoration: none;
  font-weight: 500;
}

@media (min-width: 1500px) {
  .nav,
  .header-actions {
    display: flex;
  }

  .nav-toggle,
  .mobile-nav {
    display: none !important;
  }
}

/* Hero */
.hero {
  padding: 2.25rem 0 1.5rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 860px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
    align-items: center;
    gap: 2.5rem;
    padding-block: 1rem 1.5rem;
  }
}

.hero h1 {
  font-size: clamp(1.75rem, 3.6vw, 2.55rem);
  max-width: 18ch;
}

.hero-lead {
  margin: 0 0 1.25rem;
  color: var(--muted);
  max-width: 42rem;
}

.hero-lead strong {
  color: var(--text);
  font-weight: 600;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.hero-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.promo-video-card {
  margin: 0;
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.promo-video-langnote {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.promo-video-title {
  margin: 0;
  padding: 0.75rem 1rem 0.55rem;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
  background: var(--navy-mid);
  border-bottom: 1px solid rgba(168, 221, 226, 0.18);
}

.promo-video-frame {
  position: relative;
  background: #0a1220;
  aspect-ratio: 16 / 9;
}

.promo-video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0a1220;
}

/* Sections */
.section {
  padding: 2.75rem 0;
}

.section-head {
  margin-bottom: 1.75rem;
  max-width: 46rem;
}

.section-lead {
  margin: 0;
  color: var(--muted);
}

.section-title {
  font-size: clamp(1.4rem, 2.8vw, 2rem);
}

.engine {
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.engine .section-head {
  margin-bottom: 0;
}

/* Demo animation */
.demo {
  background: var(--light);
  border-block: 1px solid var(--border);
}

.demo-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.demo-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.demo-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.demo-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  align-items: center;
}

.demo-stage {
  padding: 0.75rem;
  background: var(--navy);
  min-height: 220px;
}

.demo-svg {
  width: 100%;
  height: auto;
  max-height: 420px;
  background: #132033;
  border: 1px solid rgba(168, 221, 226, 0.18);
}

.demo-svg .sheet-bg {
  fill: #16253a;
  stroke: rgba(168, 221, 226, 0.35);
  stroke-width: 1;
}

.demo-svg .sheet-grid {
  stroke: rgba(79, 195, 205, 0.08);
  stroke-width: 0.5;
}

.demo-svg .part-outer {
  fill: rgba(79, 195, 205, 0.18);
  stroke: #7dd4da;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.demo-svg .part-hole {
  fill: #132033;
  stroke: #4fc3cd;
  stroke-width: 0.9;
  vector-effect: non-scaling-stroke;
}

.demo-svg .free-strip {
  fill: rgba(74, 140, 95, 0.14);
  stroke: rgba(74, 140, 95, 0.45);
  stroke-width: 1;
  stroke-dasharray: 4 3;
}

.demo-svg .occ-line {
  stroke: var(--teal);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0.7;
}

.demo-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.demo-dl-label {
  color: var(--muted);
}

.demo-footnote {
  margin: 0;
  padding: 0 1rem 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 400px) {
  .demo-stage {
    padding: 0.4rem;
  }

  .demo-metrics {
    font-size: 0.68rem;
  }
}

/* Process / stages */
.process {
  background: var(--card);
}

.stages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 720px) {
  .stages {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

.stage {
  display: grid;
  gap: 0.55rem;
}

.stage-marker {
  display: flex;
  align-items: center;
}

.stage-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal-deep);
  letter-spacing: 0.04em;
}

.stage-card {
  height: 100%;
  padding: 1rem;
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stage-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.stage-card p {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.stage-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--teal-deep);
}

.stage.is-active .stage-card {
  border-color: var(--teal-deep);
  background: #eef8f9;
}

/* Benefits */
.benefits {
  background: var(--light);
}

.benefits-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .benefits-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 1.5rem;
  }
}

.benefits-panel {
  padding: 1.6rem 1.4rem;
  background: var(--navy-mid);
  color: var(--on-dark);
  border-radius: var(--radius);
}

.benefits-panel h2 {
  color: #fff;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
}

.benefits-panel > p {
  color: var(--on-dark-muted);
  margin: 0 0 1rem;
}

.benefits-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--on-dark);
  font-size: 0.95rem;
}

.benefits-list li {
  margin-bottom: 0.4rem;
}

.b-cards {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 560px) {
  .b-cards {
    grid-template-columns: 1fr 1fr;
  }
}

.b-card {
  padding: 1.1rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.b-card h3 {
  font-size: 1.05rem;
}

.b-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Specs */
.specs {
  background: var(--card);
  border-block: 1px solid var(--border);
}

.specs-row {
  display: grid;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (min-width: 720px) {
  .specs-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.specs-row .cell {
  padding: 1.1rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--light);
}

@media (min-width: 720px) {
  .specs-row .cell {
    border-bottom: 0;
    border-right: 1px solid var(--border);
  }

  .specs-row .cell:last-child {
    border-right: 0;
  }
}

.specs-row dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.specs-row dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--navy);
}

/* CTA */
.cta-section {
  background: var(--light);
}

.cta-card {
  display: grid;
  gap: 1.5rem;
  padding: 1.75rem 1.4rem;
  background: var(--navy);
  color: var(--on-dark);
  border-radius: var(--radius);
}

@media (min-width: 800px) {
  .cta-card {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    align-items: center;
    padding: 2.1rem 2rem;
  }
}

.cta-card h2 {
  color: #fff;
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
}

.cta-card > div > p {
  margin: 0;
  color: var(--on-dark-muted);
}

.cta-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
}

.cta-mail {
  color: var(--teal-soft);
  text-decoration: none;
  font-size: 0.95rem;
}

.cta-note {
  font-size: 0.8rem;
  color: var(--on-dark-muted);
}

/* Footer */
.site-footer {
  background: var(--navy-mid);
  color: var(--on-dark-muted);
  padding: 2.25rem 0 1.25rem;
}

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

@media (min-width: 800px) {
  .footer-inner {
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 0.7fr));
  }
}

.foot-brand-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.6rem;
}

.foot-brand-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  padding: 6px;
  background: #fff;
  border-radius: var(--radius);
}

.foot-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-width: none;
}

.foot-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.foot-brand .brand-product {
  display: block;
  color: #fff;
  font-size: 1.05rem;
}

.foot-brand .brand-by {
  display: block;
  color: var(--teal-soft);
}

.foot-brand p {
  margin: 0;
  font-size: 0.9rem;
  max-width: 28rem;
}

.foot-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.foot-col h4 {
  color: #fff;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.foot-col a {
  color: var(--on-dark);
  text-decoration: none;
  font-size: 0.9rem;
}

.foot-col a:hover {
  color: var(--teal-soft);
}

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
}

.foot-bottom a {
  color: var(--teal-soft);
  text-decoration: none;
}

/* Spacious header with predictable single-line desktop controls. */
.site-header .header-inner {
  width: calc(100% - 48px);
  max-width: 1600px;
  min-height: 88px;
  padding-block: 12px;
  gap: 16px;
}
.site-header .brand { flex-shrink: 0; }
.site-header .brand-product, .site-header .brand-by,
.site-header .nav a, .site-header .header-phone,
.site-header .header-actions .btn { white-space: nowrap; }
.site-header .nav, .site-header .header-actions { flex-shrink: 0; }
.site-header .nav { gap: 14px; }
.site-header .nav-toggle { flex-shrink: 0; }
@media (max-width: 599px) {
  .site-header .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: calc(100% - 32px);
    gap: 10px 12px;
  }
  .site-header .brand { grid-column: 1; grid-row: 1; }
  .site-header .nav-toggle { grid-column: 2; grid-row: 1; }
  .site-header .header-inner > .lang-switch { grid-column: 1 / -1; grid-row: 2; }
  .site-header .header-inner > .lang-switch .lang-select { width: 100%; max-width: none; }
}
