/**
 * Page-level layout — header, hero, section shells,
 * per-section grids and footer. Light theme throughout;
 * section rhythm comes from alternating paper-0 / paper-100,
 * not from light/dark switching.
 */

/* ---------- Header ---------- */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
header.scrolled { border-bottom-color: var(--line); background: rgba(255, 255, 255, 0.96); box-shadow: 0 2px 18px rgba(23, 19, 12, 0.06); }

.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { height: 36px; width: auto; flex: none; }
.brand .word { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0.04em; line-height: 1; color: var(--text-strong); white-space: nowrap; }
.brand .word span {
  display: block; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.2em;
  color: var(--gold-700); margin-top: 3px; text-transform: uppercase; white-space: nowrap;
}

nav.primary-nav { display: flex; align-items: center; gap: 34px; flex: none; }
nav.primary-nav a {
  font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-dim); padding: 6px 0;
}
nav.primary-nav a:hover { color: var(--gold-700); }

.burger {
  display: none; background: var(--paper-0); border: 1px solid var(--line-strong); width: 44px; height: 44px;
  align-items: center; justify-content: center; color: var(--text-strong); flex: none;
}

#mobile-menu {
  position: fixed; inset: 72px 0 0 0; background: var(--paper-0); z-index: 99;
  transform: translateX(100%); transition: transform 0.3s ease; padding: 28px 24px;
  display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
}
#mobile-menu.open { transform: translateX(0); }
#mobile-menu a {
  font-family: var(--font-display); font-size: 1.5rem; letter-spacing: 0.03em; color: var(--text-strong);
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
#mobile-menu .plate-btn { margin-top: 22px; align-self: flex-start; }

/* ---------- Hero ---------- */
.hero {
  padding-top: 140px; padding-bottom: 96px;
  background:
    radial-gradient(ellipse 900px 500px at 82% 0%, rgba(205, 166, 63, 0.16), transparent 62%),
    repeating-linear-gradient(0deg, rgba(23, 19, 12, 0.035) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, rgba(23, 19, 12, 0.035) 0 1px, transparent 1px 64px),
    var(--paper-0);
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero-eyebrow { margin-bottom: 22px; }
.hero h1 { font-size: clamp(1.9rem, 9vw, 4.9rem); line-height: 1.02; letter-spacing: -0.01em; }
.hero h1 em { font-style: normal; color: var(--gold-600); }
.hero-sub { margin-top: 24px; max-width: 52ch; color: var(--text-dim); font-size: 1.04rem; line-height: 1.75; }
.hero-ctas { display: flex; gap: 16px; margin-top: 34px; flex-wrap: wrap; }

.spec-strip {
  margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line-strong); border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong);
  font-family: var(--font-mono);
}
.spec-strip div { background: var(--paper-0); padding: 16px 22px; }
.spec-strip div:first-child { padding-left: 0; }
.spec-strip div:last-child { padding-right: 0; }
.spec-strip .k { display: block; font-size: 0.68rem; letter-spacing: 0.14em; color: var(--gold-700); text-transform: uppercase; margin-bottom: 6px; }
.spec-strip .v { display: block; font-size: 0.92rem; color: var(--text-strong); line-height: 1.4; }

.hero-mark { position: relative; display: flex; align-items: center; justify-content: center; }
.hero-mark .ring { position: absolute; inset: 0; margin: auto; width: 78%; aspect-ratio: 1; border: 1px solid var(--line-gold); border-radius: 50%; }
.hero-mark .ring.r2 { width: 96%; border-style: dashed; }
.hero-mark img { width: 64%; position: relative; z-index: 2; filter: drop-shadow(0 16px 30px rgba(23, 19, 12, 0.18)); }

.flame-glow {
  position: absolute; z-index: 1; top: 34%; left: 63%; width: 15%; aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 59, 31, 0.55) 0%, rgba(255, 138, 31, 0.28) 45%, transparent 72%);
  filter: blur(3px);
  animation: flame-pulse 2.6s ease-in-out infinite;
}
@keyframes flame-pulse {
  0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(0.9); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
}
@media (prefers-reduced-motion: reduce) { .flame-glow { animation: none; opacity: 0.75; } }

.spark {
  position: absolute; z-index: 3; width: 6px; height: 6px; border-radius: 50%; background: var(--spark-red);
  box-shadow: 0 0 14px 4px rgba(255, 59, 31, 0.65);
  animation: spark-fly 3.4s ease-in-out infinite;
}
@keyframes spark-fly {
  0% { transform: translate(0, 0) scale(1); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .spark { animation: none; display: none; } }

.cut-edge { position: absolute; left: 0; right: 0; bottom: -1px; height: 56px; background: var(--paper-100); clip-path: polygon(0 100%, 100% 45%, 100% 100%); }

/* ---------- Section shells ---------- */
.band { padding: var(--band-pad) 0; }
.band.bg-a { background: var(--paper-0); }
.band.bg-b { background: var(--paper-100); }

.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: 52px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.7rem); max-width: 16ch; }
.section-head .lead { max-width: 42ch; font-size: 0.98rem; line-height: 1.7; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: start; }
.about-copy p { margin-bottom: 18px; font-size: 1.02rem; line-height: 1.8; }
.about-copy p:last-child { margin-bottom: 0; }

/* ---------- Vision / mission ---------- */
.vm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }

/* ---------- Machinery ---------- */
.mach-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 64px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--gold-500); color: var(--ink-950); padding: 68px 0; }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap; }
.cta-inner h2 { font-size: clamp(1.7rem, 4.4vw, 2.9rem); max-width: 14ch; color: var(--ink-950); }
.cta-links { display: flex; gap: 34px; flex-wrap: wrap; align-items: center; }
.cta-links a.contact-link { font-family: var(--font-mono); font-size: 1rem; font-weight: 600; border-bottom: 1px solid rgba(23, 19, 12, 0.4); padding-bottom: 3px; }
.cta-links a.contact-link:hover { border-color: var(--ink-950); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: start; }

/* ---------- Footer ---------- */
footer { background: var(--paper-100); border-top: 1px solid var(--line-gold); padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 0.7fr 0.9fr; gap: 48px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand img { height: 34px; width: auto; }
.footer-brand .word { font-family: var(--font-display); font-size: 1.1rem; letter-spacing: 0.04em; color: var(--text-strong); }
footer .tagline { color: var(--text-dim); font-size: 0.92rem; max-width: 34ch; line-height: 1.6; }
footer h4 { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-700); margin-bottom: 16px; }
footer .flinks li { padding: 7px 0; }
footer .flinks a { color: var(--text-dim); font-size: 0.92rem; }
footer .flinks a:hover { color: var(--gold-700); }
.footer-bottom {
  margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-dim);
}

.back-to-top {
  position: fixed; right: 18px; bottom: 18px; width: 46px; height: 46px; background: var(--gold-500); color: var(--ink-950);
  display: flex; align-items: center; justify-content: center; z-index: 90; opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  border: none; box-shadow: 0 8px 20px rgba(23, 19, 12, 0.2);
}
.back-to-top.show { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-3px); }
.back-to-top svg { width: 20px; height: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  nav.primary-nav { display: none; }
  .burger { display: flex; }
  .hero { padding-top: 116px; padding-bottom: 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-mark { order: -1; max-width: 200px; margin: 0 auto; }
  .about-grid, .vm-grid, .mach-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .band { padding: var(--band-pad-md) 0; }
}
@media (max-width: 640px) {
  .wrap { padding-inline: 20px; }
  .hero h1 { font-size: clamp(1.9rem, 10vw, 2.6rem); }
  .spec-strip { grid-template-columns: 1fr; margin-top: 36px; }
  .spec-strip div { padding: 14px 0; }
  .spec-strip div:first-child { padding-left: 0; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .plate-btn { justify-content: center; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .cta-links { flex-direction: column; align-items: flex-start; gap: 18px; }
  .footer-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .band { padding: var(--band-pad-sm) 0; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}
@media (max-width: 420px) {
  .brand .word span { display: none; }
  .brand img { height: 30px; }
}
