/* ==================================================================
   DESIGN TOKENS
   Client note: change --accent / --amber here to re-theme the site
   ================================================================== */
:root {
  --navy-950: #EAE2D5;   /* page background base — warm beige, under the doodle pattern */
  --navy-900: #F1EBDE;   /* subtle section stripes / input bg */
  --navy-800: #FFFFFF;   /* card / modal background — white */
  --navy-700: #E3D9C8;   /* soft dividers/fills */
  --line: rgba(94, 78, 55, 0.16);

  --signal: #0EA5B7;
  --signal-dim: rgba(14, 165, 183, 0.10);
  --amber: #FF9F1C;
  --amber-dark: #E8890A;

  --text-hi: #101828;
  --text-mid: #475569;
  --text-low: #5C6773;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-soft: 0 20px 44px -22px rgba(16, 24, 40, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background-color: var(--navy-950);
  background-image: url("bg-pattern.svg");
  background-repeat: repeat;
  background-size: 320px 320px;
  color: var(--text-mid);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { font-family: var(--font-display); color: var(--text-hi); margin: 0 0 12px; line-height: 1.15; text-shadow: 0 0 14px rgba(255,255,255,0.75); }
p { margin: 0 0 16px; text-shadow: 0 0 10px rgba(255,255,255,0.55); }
li, summary { text-shadow: 0 0 10px rgba(255,255,255,0.55); }
a { color: var(--signal); text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn--primary { background: var(--amber); color: #26160A; }
.btn--primary:hover { background: var(--amber-dark); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--text-hi); border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--signal); color: var(--signal); }
.btn--lg { padding: 15px 28px; font-size: 1rem; }
.btn--sm { padding: 9px 18px; font-size: 0.875rem; }
.btn--block { width: 100%; }

/* ================= TOPBAR ================= */
.topbar {
  background: var(--navy-900);
  color: var(--text-low);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.topbar__phone { color: var(--signal); font-family: var(--font-mono); font-weight: 700; }

/* ================= HEADER ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.88)), url('background1.jpeg');
  background-size: auto 100%;
  background-repeat: repeat-x;
  background-position: center;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__row { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; color: var(--text-hi); font-size: 1.05rem; }
.logo__mark { color: var(--signal); display: inline-flex; }
.nav__cta { white-space: nowrap; }
.site-header__actions { display: flex; align-items: center; gap: 10px; }

.nav__burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  cursor: pointer;
}
.nav__burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-hi);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hidden by default (the `hidden` attribute on the <nav> handles this);
   JS toggles the attribute on/off when the hamburger is tapped. */
.mobile-nav {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
}
.mobile-nav[hidden] { display: none; }
.mobile-nav a {
  padding: 14px 24px;
  color: var(--text-mid);
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { color: var(--signal); }

/* ================= HERO ================= */
.hero { position: relative; overflow: hidden; padding: 28px 0 24px; }
.hero__rings { position: absolute; inset: -20% -10% auto auto; width: 620px; height: 620px; pointer-events: none; }
.ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--signal-dim); animation: pulse-ring 4.5s ease-out infinite; }
.ring--2 { inset: 10%; animation-delay: 1.1s; }
.ring--3 { inset: 22%; animation-delay: 2.2s; }
@keyframes pulse-ring {
  0% { transform: scale(0.75); opacity: 0.9; }
  80% { opacity: 0; }
  100% { transform: scale(1.05); opacity: 0; }
}
.hero__grid { display: grid; gap: 40px; align-items: center; position: relative; z-index: 1; }
@media (min-width: 920px) { .hero__grid { grid-template-columns: 1.15fr 0.85fr; } }
.hero__grid--full { grid-template-columns: 1fr; max-width: 760px; margin: 0 auto; text-align: left; }
@media (min-width: 920px) { .hero__grid--full { grid-template-columns: 1fr; } }

.eyebrow { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; color: var(--signal); margin-bottom: 14px; }
.eyebrow--center { text-align: center; }

.hero h1 { font-size: clamp(2rem, 4.4vw, 3rem); max-width: 14ch; }
.hero h1 .hl { color: var(--signal); }
.hero__sub { max-width: 52ch; font-size: 1.05rem; }
.hero__cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin: 22px 0 26px; }
.trust-strip { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; color: var(--text-low); }

.hero__visual { display: flex; justify-content: center; }

/* ================= 3D MACHINE SHOWCASE ================= */
.viewer3d { text-align: center; }
.viewer3d__stage {
  position: relative;
  width: min(320px, 78vw);
  margin: 44px auto 0;
  perspective: 1000px;
}
.viewer3d__stage img {
  width: 100%;
  display: block;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 22px 24px rgba(0,0,0,0.5));
  pointer-events: none;
  transform-style: preserve-3d;
  animation: showcase-spin 7s ease-in-out infinite;
  transition: transform 0.15s ease-out;
}
@keyframes showcase-spin {
  0%, 100% { transform: rotateY(-14deg) rotateX(2deg); }
  50% { transform: rotateY(14deg) rotateX(-2deg); }
}
.viewer3d__ring {
  position: absolute;
  left: 50%;
  bottom: 14px;
  width: 78%;
  aspect-ratio: 1 / 1;
  transform: translateX(-50%) rotateX(78deg);
  border-radius: 50%;
  border: 2px solid var(--signal-dim);
  box-shadow: 0 0 0 14px rgba(14,165,183,0.05), 0 0 40px rgba(14,165,183,0.15);
  animation: showcase-ring-spin 6s linear infinite;
  z-index: 1;
}
.viewer3d__ring::before {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  border: 1px dashed var(--signal-dim);
}
@keyframes showcase-ring-spin {
  from { transform: translateX(-50%) rotateX(78deg) rotateZ(0deg); }
  to { transform: translateX(-50%) rotateX(78deg) rotateZ(360deg); }
}
.viewer3d__shadow {
  width: 60%;
  height: 18px;
  margin: -6px auto 0;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.55), transparent 70%);
  border-radius: 50%;
  position: relative;
  z-index: 0;
}
@media (prefers-reduced-motion: reduce) {
  .viewer3d__stage img, .viewer3d__ring { animation: none; transform: none; }
}

/* ================= PROOF STRIP ================= */
.proof { background: var(--navy-800); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.proof__row { display: grid; gap: 16px; align-items: center; margin-top: 18px; }
@media (min-width: 800px) { .proof__row { grid-template-columns: repeat(3, auto) 1fr; } }
.proof__stat { font-size: 0.85rem; color: var(--text-low); white-space: nowrap; }
.proof__stat span { display: block; font-family: var(--font-mono); font-size: 1.3rem; color: var(--signal); font-weight: 700; }
.proof__quote { font-size: 0.95rem; color: var(--text-mid); font-style: italic; }
.proof__quote span { display: block; font-style: normal; font-size: 0.75rem; color: var(--text-low); margin-top: 4px; }

/* ================= SECTION GENERIC ================= */
.section { padding: 30px 0; }
.section-title { font-size: clamp(1.5rem, 3vw, 2.1rem); max-width: 22ch; margin-bottom: 8px; }
.section-title--center { max-width: none; text-align: center; margin-left: auto; margin-right: auto; }
.section-sub { max-width: 60ch; margin-bottom: 10px; }

/* ================= PACKAGES ================= */
.packages { text-align: left; }
.packages .section-sub, .packages .section-title { text-align: center; margin-left: auto; margin-right: auto; }
.pkg-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-top: 22px; }
.pkg-card {
  position: relative;
  background: var(--navy-800);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0 0 18px;
  text-align: center;
  transition: border-color 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  overflow: hidden;
}
.pkg-card__body { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; text-align: center; padding: 0 18px; }
.pkg-card__img { flex: 0 0 auto; width: 100%; border-radius: 0; overflow: hidden; align-self: stretch; background: var(--navy-900); }
.pkg-card__img img { width: 100%; height: auto; display: block; }
.pkg-card:hover { border-color: var(--signal); transform: translateY(-3px); }
.pkg-card--popular { border-color: var(--amber); }
.pkg-card__ribbon { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: var(--amber); color: #26160A; font-size: 0.65rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; white-space: nowrap; z-index: 2; }
.pkg-card h3 { font-size: 1.05rem; margin: 14px 0 4px; }
.pkg-card__price { font-family: var(--font-mono); font-size: 1.5rem; color: var(--signal); font-weight: 700; margin-bottom: 4px; }
.pkg-card--popular .pkg-card__price { color: var(--amber); }
.pkg-card__range { font-size: 0.8rem; color: var(--text-low); margin-bottom: 10px; }
.pkg-card__use { font-size: 0.85rem; color: var(--text-mid); margin-bottom: 0; }
.pkg-card__addon { font-size: 0.75rem; color: var(--amber); margin: 8px 0 0; }
.pkg-card__cta { width: 100%; margin-top: auto; }
.pkg-card__badge-new { display: inline-block; background: var(--signal); color: #062018; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.03em; padding: 4px 12px; border-radius: 999px; margin: 14px 0 2px; text-transform: uppercase; }

.packages__footnote { text-align: center; color: var(--text-low); font-size: 0.85rem; margin: 18px 0 0; }

/* ================= WHY + HOW (combined) ================= */
.why-how__grid { display: grid; gap: 28px; }
@media (min-width: 860px) { .why-how__grid { grid-template-columns: 1fr 1fr; } }
.why-how__col .section-title { font-size: 1.35rem; }
.why__list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; }
.why__list li { background: var(--navy-800); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; color: var(--text-mid); font-size: 0.875rem; }
.why__list strong { color: var(--text-hi); }

.steps--vertical { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 16px; }
.steps--vertical li { display: flex; gap: 14px; text-align: left; align-items: flex-start; }
.steps__num { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--signal-dim); color: var(--signal); font-family: var(--font-mono); font-weight: 700; }
.steps--vertical h3 { font-size: 0.95rem; margin-bottom: 2px; }
.steps--vertical p { font-size: 0.85rem; color: var(--text-low); margin: 0; }

/* ================= GALLERY (scrollable carousel, moved to top) ================= */
.gallery--top { padding-top: 20px; padding-bottom: 20px; }
.gallery__carousel {
  display: flex;
  gap: 14px;
  margin-top: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: none; /* disabled so JS auto-scroll is perfectly smooth, not snap-jittery */
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--signal) transparent;
}
.gallery__carousel::-webkit-scrollbar { height: 8px; }
.gallery__carousel::-webkit-scrollbar-thumb { background: var(--signal); border-radius: 999px; }
.gallery__carousel figure {
  flex: 0 0 auto;
  margin: 0;
  height: 240px;
  width: auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--navy-800);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 480px) {
  .gallery__carousel figure { height: 180px; }
}
.gallery__carousel img { width: auto; height: 100%; max-width: none; object-fit: contain; display: block; }

/* ================= FAQ ================= */
.faq__list { max-width: 500px; margin: 5px auto 0; display: grid; gap: 2px; }
.faq__item { background: var(--navy-800); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 10px; }
.faq__item summary { cursor: pointer; font-weight: 600; color: var(--text-hi); list-style: none; display: flex; justify-content: space-between; font-size: 0.85rem; line-height: 1.3; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; color: var(--signal); font-size: 1.05rem; margin-left: 12px; }
.faq__item[open] summary::after { content: "–"; }
.faq__item p { margin: 4px 0 0; font-size: 0.78rem; line-height: 1.35; }

/* ================= FINAL CTA ================= */
.final-cta { text-align: center; background: radial-gradient(circle at 50% 0%, rgba(14,165,183,0.1), transparent 60%), var(--navy-900); }
.final-cta__inner { max-width: 560px; margin: 0 auto; }
.final-cta h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }

/* ================= FOOTER ================= */
.site-footer { background: var(--navy-425); border-top: 1px solid var(--line); padding: 28px 0 12px; }
.site-footer__grid { display: grid; gap: 28px; font-size: 0.875rem; }
@media (min-width: 700px) { .site-footer__grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.site-footer h4 { color: var(--text-hi); font-family: var(--font-body); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.logo--footer { font-family: var(--font-display); color: var(--text-hi); font-weight: 700; margin-bottom: 6px; }
.site-footer a { color: var(--text-mid); }
.site-footer a:hover { color: var(--signal); }
.site-footer__copy { text-align: center; color: var(--text-low); font-size: 0.75rem; margin: 36px 0 0; }
.site-footer__privacy-link { color: var(--text-low); text-decoration: underline; }
.site-footer__privacy-link:hover { color: var(--signal); }
.site-footer__credit { text-align: center; color: var(--text-low); font-size: 0.7rem; margin: 8px 0 0; opacity: 0.8; }
.site-footer__credit a { color: var(--signal); font-weight: 600; }
.site-footer__credit a:hover { text-decoration: underline; }

/* ================= PRIVACY POLICY (brief) ================= */
.privacy-policy { padding: 20px 0; }
.privacy-policy .container { max-width: 640px; }
.privacy-policy p { font-size: 0.8rem; color: var(--text-low); line-height: 1.5; text-align: center; }

/* ================= STICKY FLOATING ORDER BUTTON ================= */
.fab-order {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--amber);
  color: #FFFFFF;
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 12px 30px -10px rgba(255, 178, 56, 0.55);
  animation: fab-breathe 2.6s ease-in-out infinite;
  overflow: hidden;
}
.fab-order:hover { background: var(--amber-dark); }
.fab-order__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.32;
  z-index: 0;
}
.fab-order::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(232,137,10,0.85), rgba(255,159,28,0.55));
  z-index: 0;
}
.fab-order__icon, .fab-order__text { position: relative; z-index: 1; text-shadow: 0 1px 3px rgba(0,0,0,0.35); }
@keyframes fab-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}
.fab-messenger {
  position: fixed;
  right: 20px;
  bottom: 84px;
  z-index: 50;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--navy-800);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: var(--shadow-soft);
}
@media (max-width: 480px) {
  .fab-order__text { display: none; }
  .fab-order { padding: 14px; }
  .fab-messenger { bottom: 78px; }
}

/* ================= MODAL ================= */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(3, 6, 12, 0.72);
  backdrop-filter: blur(3px);
  display: flex; align-items: flex-end;
  justify-content: center;
}
@media (min-width: 640px) { .modal-overlay { align-items: center; } }
.modal-overlay[hidden] { display: none; }

.modal {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--navy-800);
  border: 1px solid var(--line);
  border-radius: 20px 20px 0 0;
  padding: 30px 24px 26px;
  box-shadow: var(--shadow-soft);
}
@media (min-width: 640px) { .modal { border-radius: var(--radius-lg); } }

.modal__close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent;
  color: var(--text-mid); cursor: pointer; font-size: 0.9rem;
}
.modal__close:hover { color: var(--signal); border-color: var(--signal); }

.modal__sub { font-size: 0.9rem; color: var(--text-low); }
#orderForm { display: grid; gap: 14px; margin-top: 18px; }
#orderForm label { display: grid; gap: 6px; font-size: 0.85rem; color: var(--text-mid); font-weight: 500; }
#orderForm .optional { color: var(--text-low); font-weight: 400; }
#orderForm input, #orderForm select, #orderForm textarea {
  font-family: var(--font-body);
  background: var(--navy-900);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text-hi);
  font-size: 0.95rem;
  resize: vertical;
}
#orderForm input:focus, #orderForm select:focus, #orderForm textarea:focus {
  border-color: var(--signal);
  outline: none;
}
.modal__note { font-size: 0.72rem; color: var(--text-low); text-align: center; margin: 4px 0 0; }
.modal__success-icon { font-size: 2.4rem; text-align: center; margin-bottom: 6px; }
[data-modal-panel="success"], [data-modal-panel="error"] { text-align: center; }

.btn[disabled] { opacity: 0.6; cursor: not-allowed; }
