/* ═══════════════════════════════════════════════════════
   Shiro Labs — Apple Design System
   Spec: apple.md from popular-web-designs skill
   ═══════════════════════════════════════════════════════ */

/* ─── Design Tokens — Apple Exact ────────────────────── */
:root {
  /* Surfaces */
  --black:    #000000;
  --white:    #ffffff;
  --gray-bg:  #f5f5f7;   /* Apple light section bg */
  --ink:      #1d1d1f;   /* Near-black for body */
  --ink-80:   rgba(0, 0, 0, 0.80);  /* Body text on light */
  --ink-48:   rgba(0, 0, 0, 0.48);  /* Tertiary / disabled */

  /* Accent — Apple Blue (the ONLY chromatic accent) */
  --blue:        #0071e3;
  --blue-hover:  #0077ed;
  --link-light:  #0066cc;  /* Link on light bg */
  --link-dark:   #2997ff;  /* Link on dark bg */

  /* Dark surfaces (dark section cards) */
  --dark-1: #272729;
  --dark-2: #262628;
  --dark-3: #28282a;
  --dark-4: #2a2a2d;
  --dark-5: #242426;

  /* Nav glass */
  --nav-glass: rgba(0, 0, 0, 0.80);

  /* Focus ring */
  --focus: #0071e3;

  /* Typography — system font stack (SF Pro) */
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display',
           'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'SF Mono (system)', ui-monospace, SFMono-Regular,
                Menlo, Monaco, Consolas, monospace;

  /* Spacing */
  --space-2:  2px;
  --space-4:  4px;
  --space-5:  5px;
  --space-6:  6px;
  --space-8:  8px;
  --space-10: 10px;
  --space-14: 14px;
  --space-15: 15px;
  --space-17: 17px;
  --space-20: 20px;
  --space-24: 24px;
  --space-28: 28px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-56: 56px;
  --space-64: 64px;

  /* Layout */
  --content-max: 980px;
  --nav-h: 48px;

  /* Radius */
  --r-micro:     5px;
  --r-std:       8px;
  --r-comfort:   11px;
  --r-large:     12px;
  --r-pill:      980px;

  /* Shadows */
  --shadow-card: rgba(0, 0, 0, 0.22) 3px 5px 30px 0px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background-color: var(--black);
  color: var(--white);
  line-height: 1.47;
  letter-spacing: -0.374px;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: pointer; font-family: inherit; }
img, svg { display: block; }

/* ─── Selection & Scrollbar ──────────────────────────── */
::selection { background: rgba(0, 113, 227, 0.2); color: inherit; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.25); border-radius: 10px; }

/* ─── Focus ─────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ═══════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════ */

.nav-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  background: var(--nav-glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-inner {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--space-24);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  font-size: 0.88rem;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
  letter-spacing: -0.01em;
  transition: color 200ms var(--ease);
}
.nav-logo:hover { color: var(--white); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-28);
}

.nav-link {
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255,255,255,0.78);
  letter-spacing: -0.01em;
  transition: color 200ms var(--ease);
}
.nav-link:hover { color: var(--white); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px; height: 32px;
  padding: 4px;
  border-radius: 6px;
  transition: background 200ms var(--ease);
}
.hamburger:hover { background: rgba(255,255,255,0.1); }

.hamburger span {
  display: block;
  height: 1.5px;
  background: rgba(255,255,255,0.78);
  border-radius: 2px;
  transition: transform 300ms var(--ease-out), opacity 300ms var(--ease);
  transform-origin: center;
}
.hamburger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); background: #fff; }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); background: #fff; }

/* ═══════════════════════════════════════════════════════
   SECTION CONTAINER
   ═══════════════════════════════════════════════════════ */

.section-container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--space-24);
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: var(--space-8);
}

.section-headline {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.028em;
  color: var(--white);
}

/* ═══════════════════════════════════════════════════════
   HERO — Dark, cinematic
   ═══════════════════════════════════════════════════════ */

.hero-section {
  min-height: 100vh;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + var(--space-64)) var(--space-24) var(--space-80);
}

.hero-content {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-20);
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.hero-headline {
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.028em;
  color: var(--white);
}

.hero-subhead {
  font-size: 1.06rem;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  color: rgba(255,255,255,0.65);
  max-width: 44ch;
}

.hero-ctas {
  display: flex;
  gap: var(--space-14);
  flex-wrap: wrap;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════
   BUTTONS — Apple pill CTAs
   ═══════════════════════════════════════════════════════ */

/* Shared pill shape */
.cta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 1.06rem;
  font-weight: 400;
  border-radius: var(--r-pill);
  padding: var(--space-8) var(--space-24);
  transition: all 220ms var(--ease);
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  letter-spacing: -0.374px;
}

/* Solid blue CTA */
.cta-solid {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.cta-solid:hover {
  background: var(--blue-hover);
  border-color: var(--blue-hover);
}

/* Outline light CTA (for dark backgrounds) */
.cta-outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.cta-outline-light:hover {
  border-color: rgba(255,255,255,0.85);
  color: var(--white);
}

/* ─── Tile links (smaller pill variant) ──────────────── */
.tile-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: -0.224px;
  border-radius: var(--r-pill);
  padding: var(--space-5) var(--space-17);
  transition: all 220ms var(--ease);
}

.tile-link-solid {
  background: var(--blue);
  color: var(--white);
  border: 1px solid var(--blue);
}
.tile-link-solid:hover {
  background: var(--blue-hover);
  border-color: var(--blue-hover);
}

.tile-link-ghost {
  background: rgba(255,255,255,0.08);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.15);
  padding: var(--space-5);
}
.tile-link-ghost:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.25);
}

/* ═══════════════════════════════════════════════════════
   EXPERIMENTS — Light section (#f5f5f7)
   ═══════════════════════════════════════════════════════ */

.experiments-section {
  background: var(--gray-bg);
  color: var(--ink);
  padding: var(--space-80) 0;
}

.experiments-section .section-label {
  color: rgba(0,0,0,0.45);
}

.experiments-section .section-headline {
  color: var(--ink);
  margin-bottom: var(--space-56);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-14);
}

/* ─── Product Tile ───────────────────────────────────── */
.product-tile {
  border-radius: var(--r-large);
  padding: var(--space-32) var(--space-28);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 340px;
  transition: transform 350ms var(--ease-out);
}

.product-tile:hover { transform: translateY(-3px); }

/* Dark tile (black card on light gray bg) */
.product-tile-dark {
  background: var(--black);
  color: var(--white);
  box-shadow: var(--shadow-card);
}

/* Light tile (white card on light gray bg) */
.product-tile-light {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.tile-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  flex: 1;
}

.tile-category {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.45);
}

.product-tile-dark .tile-category { color: rgba(255,255,255,0.45); }

.tile-name {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.tile-descriptor {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.224px;
  color: var(--blue);
  line-height: 1.29;
}

.tile-copy {
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.43;
  letter-spacing: -0.224px;
  color: rgba(0,0,0,0.72);
}

.product-tile-dark .tile-copy { color: rgba(255,255,255,0.65); }

.tile-links {
  display: flex;
  gap: var(--space-8);
  align-items: center;
  padding-top: var(--space-24);
}

/* Light tile: solid link becomes blue pill, ghost stays dark */
.product-tile-light .tile-link-solid {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}
.product-tile-light .tile-link-solid:hover {
  background: #000;
  border-color: #000;
}

.product-tile-light .tile-link-ghost {
  background: rgba(0,0,0,0.05);
  color: var(--ink);
  border-color: rgba(0,0,0,0.12);
}
.product-tile-light .tile-link-ghost:hover {
  background: rgba(0,0,0,0.1);
  border-color: rgba(0,0,0,0.2);
}

/* ═══════════════════════════════════════════════════════
   ABOUT — Dark section
   ═══════════════════════════════════════════════════════ */

.about-section {
  background: var(--black);
  color: var(--white);
  padding: var(--space-80) 0;
}

.about-body {
  margin-top: var(--space-28);
  margin-bottom: var(--space-40);
  max-width: 60ch;
}

.about-para {
  font-size: 1.06rem;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  color: rgba(255,255,255,0.70);
  margin-bottom: var(--space-17);
}

.about-para strong {
  font-weight: 600;
  color: rgba(255,255,255,0.92);
}

.about-stats {
  display: flex;
  gap: var(--space-48);
  margin-bottom: var(--space-40);
  padding: var(--space-28) 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.stat-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat-num {
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--white);
}

.stat-lbl {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

.about-social {
  display: flex;
  gap: var(--space-14);
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: -0.224px;
  color: var(--link-dark);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease), color 200ms var(--ease);
  padding-bottom: 1px;
}

.social-link:hover {
  border-bottom-color: var(--link-dark);
}

/* ═══════════════════════════════════════════════════════
   CONTACT — Light section
   ═══════════════════════════════════════════════════════ */

.contact-section {
  background: var(--gray-bg);
  color: var(--ink);
  padding: var(--space-80) 0;
}

.contact-section .section-label { color: rgba(0,0,0,0.45); }
.contact-section .section-headline { color: var(--ink); }

.contact-desc {
  font-size: 1.06rem;
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.374px;
  color: rgba(0,0,0,0.72);
  max-width: 44ch;
  margin-bottom: var(--space-40);
  margin-top: var(--space-14);
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
  max-width: 560px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-17);
  padding: var(--space-17) var(--space-20);
  background: var(--white);
  border-radius: var(--r-std);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: all 220ms var(--ease);
  border: 1px solid transparent;
}

.contact-item:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
  border-color: rgba(0,0,0,0.07);
  transform: translateX(3px);
}

.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-std);
  background: var(--gray-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  flex-shrink: 0;
}

.contact-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.contact-type {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.45);
}

.contact-value {
  font-size: 0.94rem;
  font-weight: 400;
  letter-spacing: -0.374px;
  color: var(--ink);
}

.contact-arrow {
  color: rgba(0,0,0,0.25);
  flex-shrink: 0;
  transition: transform 220ms var(--ease), color 220ms var(--ease);
}

.contact-item:hover .contact-arrow {
  transform: translateX(3px);
  color: var(--blue);
}

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */

.site-footer {
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: var(--space-24) 0;
}

.footer-inner {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--space-24);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255,255,255,0.35);
  letter-spacing: -0.12px;
}

.footer-links {
  display: flex;
  gap: var(--space-24);
}

.footer-links a {
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255,255,255,0.40);
  letter-spacing: -0.12px;
  transition: color 200ms var(--ease);
}
.footer-links a:hover { color: rgba(255,255,255,0.70); }

/* ═══════════════════════════════════════════════════════
   SCROLL REVEAL — Pure CSS, no JS
   @keyframes + animation-fill-mode: both ensures elements
   are always visible once the page loads, regardless of
   IntersectionObserver support in the environment.
   ═══════════════════════════════════════════════════════ */

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Elements start visible immediately — no JS dependency */
.product-tile,
.about-section,
.contact-section {
  animation: fadeSlideUp 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Product tiles stagger via animation-delay */
.product-tile:nth-child(1) { animation-delay: 60ms; }
.product-tile:nth-child(2) { animation-delay: 160ms; }
.product-tile:nth-child(3) { animation-delay: 260ms; }

/* about + contact sections */
.about-section    { animation-delay: 40ms; }
.contact-section  { animation-delay: 80ms; }

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .product-tile,
  .about-section,
  .contact-section {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(0,0,0,0.92);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    flex-direction: column;
    gap: 0;
    padding: var(--space-8) 0;
    transform: translateY(-110%);
    transition: transform 320ms var(--ease-out);
    z-index: 199;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-link {
    padding: var(--space-14) var(--space-24);
    font-size: 1rem;
    width: 100%;
    color: rgba(255,255,255,0.85);
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .nav-link:last-child { border-bottom: none; }

  .hero-section { padding-top: calc(var(--nav-h) + var(--space-48)); }
  .hero-headline { font-size: clamp(2.25rem, 10vw, 3rem); }
  .hero-ctas { flex-direction: column; align-items: center; }
  .hero-ctas .cta-pill { width: 100%; max-width: 280px; }

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

  .about-stats { gap: var(--space-28); flex-wrap: wrap; }
  .stat-num { font-size: 2rem; }

  .contact-items { max-width: 100%; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .section-container { padding-inline: var(--space-17); }
  .hero-section { padding-inline: var(--space-17); }
  .about-social { flex-direction: column; }
}

/* ─── Reduced Motion ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .product-tile:hover { transform: none; }
  .contact-item:hover { transform: none; }
  .product-tile, .about-section, .contact-section {
    animation: none;
    opacity: 1;
    transform: none;
  }
  html { scroll-behavior: auto; }
}
