/* ─────────────────────────────────────────────
   NEXTUINO.CN  —  Global stylesheet
   Apple-inspired: white, large type, negative space
   ───────────────────────────────────────────── */

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

:root {
  --white:      #ffffff;
  --off-white:  #f5f5f7;
  --near-black: #1d1d1f;
  --mid-gray:   #6e6e73;
  --light-gray: #d2d2d7;
  --accent:     #f5c518;       /* NEXTuino yellow — used sparingly */
  --ink:        #1d1d1f;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.375rem;
  --text-2xl:  1.75rem;
  --text-3xl:  2.25rem;
  --text-4xl:  3rem;
  --text-5xl:  4rem;
  --text-6xl:  5.5rem;
  --text-hero: clamp(3.2rem, 8vw, 7rem);

  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;
  --sp-4: 1rem;     --sp-6: 1.5rem;   --sp-8: 2rem;
  --sp-10: 2.5rem;  --sp-12: 3rem;    --sp-16: 4rem;
  --sp-20: 5rem;    --sp-24: 6rem;    --sp-32: 8rem;

  --radius: 12px;
  --max-w: 1080px;
  --max-w-narrow: 720px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: var(--text-base);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }

/* ─── UTILITIES ─── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-8);
}
.container--narrow {
  max-width: var(--max-w-narrow);
}
.label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mid-gray);
  margin-bottom: var(--sp-6);
}

/* ─── NAV ─── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6) var(--sp-8);
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.nav-logo img {
  height: 28px;
  width: auto;
}

/* ─── HERO ─── */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(80px + var(--sp-16)) var(--sp-8) var(--sp-16);
  background: var(--white);
  overflow: hidden;
}
.hero-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mid-gray);
  margin-bottom: var(--sp-8);
}
.hero h1 {
  font-size: var(--text-hero);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.04;
  color: var(--near-black);
  margin-bottom: var(--sp-8);
  max-width: 900px;
}
.hero-sub {
  font-size: clamp(var(--text-lg), 2vw, var(--text-xl));
  font-weight: 400;
  color: var(--mid-gray);
  line-height: 1.6;
  max-width: 560px;
  margin-bottom: var(--sp-16);
}
.hero-image {
  width: min(600px, 88vw);
  margin: 0 auto;
}
.hero-image img {
  width: 100%;
  height: auto;
  /* placeholder slot for future hero image if needed */
}

/* ─── POSITIONING ─── */
.section-positioning {
  padding: var(--sp-32) var(--sp-8);
  background: var(--off-white);
}
.section-positioning .container--narrow {
  margin: 0 auto;
}
.section-positioning h2 {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
  color: var(--near-black);
  margin-bottom: var(--sp-8);
}
.section-positioning p {
  font-size: var(--text-lg);
  line-height: 1.8;
  color: var(--mid-gray);
  margin-bottom: var(--sp-6);
}
.section-positioning p:last-child { margin-bottom: 0; }

/* ─── ARDUINO BAND ─── */
.section-arduino {
  padding: var(--sp-32) var(--sp-8);
  background: var(--near-black);
  text-align: center;
}
.section-arduino h2 {
  font-size: clamp(var(--text-4xl), 7vw, var(--text-6xl));
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: var(--sp-8);
}
.section-arduino h2 em {
  font-style: normal;
  color: var(--accent);
}
.section-arduino p {
  font-size: clamp(var(--text-lg), 2vw, var(--text-xl));
  font-weight: 400;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
}

/* ─── PRODUCT FAMILY ─── */
.section-products {
  padding: var(--sp-32) var(--sp-8);
  background: var(--white);
}
.section-products-header {
  text-align: center;
  margin-bottom: var(--sp-24);
}
.section-products-header h2 {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
  color: var(--near-black);
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-32);
}
.product-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
  align-items: center;
}
.product-item--reverse {
  direction: rtl;
}
.product-item--reverse > * {
  direction: ltr;
}
.product-copy { }
.product-copy .product-name {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-4);
}
.product-copy h3 {
  font-size: clamp(var(--text-2xl), 3.5vw, var(--text-4xl));
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.15;
  color: var(--near-black);
  margin-bottom: var(--sp-6);
}
.product-copy p {
  font-size: var(--text-lg);
  line-height: 1.75;
  color: var(--mid-gray);
}
.product-image {
  background: var(--off-white);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-8);
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.product-image--placeholder {
  background: var(--off-white);
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--light-gray);
}
.product-image--placeholder span {
  font-size: var(--text-sm);
  color: var(--light-gray);
  font-weight: 500;
}

/* ─── WHY NEXTUINO ─── */
.section-why {
  padding: var(--sp-32) var(--sp-8);
  background: var(--off-white);
}
.section-why-header {
  text-align: center;
  margin-bottom: var(--sp-24);
}
.section-why-header h2 {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
  color: var(--near-black);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-8);
}
.why-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: var(--sp-10);
}
.why-card-icon {
  width: 44px;
  height: 44px;
  background: var(--near-black);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-6);
}
.why-card-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--white);
}
.why-card h3 {
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--near-black);
  margin-bottom: var(--sp-4);
}
.why-card p {
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--mid-gray);
}

/* Quality / Factory image section */
.section-quality-img {
  padding: 0 var(--sp-8) var(--sp-32);
  background: var(--off-white);
}
.quality-img-frame {
  max-width: var(--max-w);
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/7;
}
.quality-img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── CLOSING ─── */
.section-closing {
  padding: var(--sp-32) var(--sp-8);
  background: var(--near-black);
  text-align: center;
}
.section-closing h2 {
  font-size: clamp(var(--text-3xl), 6vw, var(--text-hero));
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.08;
  color: var(--white);
  margin-bottom: var(--sp-6);
}
.section-closing .closing-sub {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.45);
  letter-spacing: .01em;
}

/* ─── FOOTER ─── */
.footer {
  padding: var(--sp-10) var(--sp-8);
  background: var(--near-black);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--sp-6);
}
.footer-logo img {
  height: 30px;
  width: auto;
  opacity: 0.85;
}
.footer-legal {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.4);
}
.footer-legal a {
  color: rgba(255,255,255,0.45);
  transition: color .2s;
}
.footer-legal a:hover { color: var(--white); }

.footer-copy {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.35);
}

/* ─── LEGAL PAGES ─── */
.legal-page {
  padding: calc(80px + var(--sp-16)) var(--sp-8) var(--sp-32);
  background: var(--white);
  min-height: 100svh;
}
.legal-page h1 {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--near-black);
  margin-bottom: var(--sp-4);
}
.legal-intro {
  font-size: var(--text-sm);
  color: var(--mid-gray);
  margin-bottom: var(--sp-12);
  padding-bottom: var(--sp-8);
  border-bottom: 1px solid var(--light-gray);
}
.legal-body h2 {
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--near-black);
  margin-top: var(--sp-10);
  margin-bottom: var(--sp-3);
}
.legal-body p {
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--mid-gray);
}

/* ─── FLOATING ANCHOR NAV ─── */
.anchor-nav {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  background: rgba(20, 20, 20, 0.88);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  padding: var(--sp-2) var(--sp-3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
  white-space: nowrap;
}
.anchor-nav--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.anchor-nav-item {
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  padding: var(--sp-2) var(--sp-4);
  border-radius: 100px;
  transition: color .2s, background .2s;
}
.anchor-nav-item:hover {
  color: var(--white);
}
.anchor-nav-item.active {
  color: var(--white);
  background: rgba(255,255,255,0.12);
}
.anchor-nav-sep {
  width: 1px;
  height: 14px;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}

/* ─── SECTORS ─── */
.section-sectors {
  padding: var(--sp-32) var(--sp-8);
  background: var(--near-black);
}
.section-sectors-header {
  text-align: center;
  margin-bottom: var(--sp-20);
}
.section-sectors-header .label {
  color: rgba(255,255,255,0.4);
}
.section-sectors-header h2 {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
  color: var(--white);
}
.sectors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  overflow: hidden;
}
.sector-item {
  background: var(--near-black);
  padding: var(--sp-10);
  transition: background .2s;
}
.sector-item:hover {
  background: rgba(255,255,255,0.04);
}
.sector-icon {
  width: 40px;
  height: 40px;
  margin-bottom: var(--sp-5);
}
.sector-icon svg {
  width: 40px;
  height: 40px;
  stroke: var(--accent);
}
.sector-item h3 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--white);
  margin-bottom: var(--sp-3);
  letter-spacing: -.01em;
}
.sector-item p {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: rgba(255,255,255,0.45);
}

/* ─── SCROLL ANIMATIONS ─── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: none;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .product-item,
  .product-item--reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }
  .why-grid       { grid-template-columns: 1fr; }
  .sectors-grid   { grid-template-columns: 1fr 1fr; }
  .quality-img-frame { aspect-ratio: 16/9; }
  .anchor-nav     { top: 68px; }
}
@media (max-width: 600px) {
  :root { --sp-32: 5rem; --sp-24: 4rem; }
  .footer-inner { flex-direction: column; text-align: center; }
}
