/* ═══════════════════════════════════════════════════════════
   WifiLabs v2 — Carousel Editorial Design System
   Based on: carousel-editorial skill
   ═════════════════════════════════════════════════════════ */

/* ── Design Tokens ─────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-page: #f5f1ec;
  --bg-surface: #faf7f3;
  --bg-card: #ffffff;

  /* Text */
  --text-primary: #1d1d1d;
  --text-secondary: #4a4a4a;
  --text-muted: #b0a898;

  /* Accent */
  --clr-accent: #c75c4a;
  --clr-accent-light: rgba(199, 92, 74, 0.12);
  --clr-accent-hover: #b5503f;

  /* Decorative */
  --clr-tape: #5a9e8f;
  --clr-tape-alt: #d4a574;
  --clr-sticky: #fef9e7;
  --clr-sticky-border: #e8dcc8;

  /* Structural */
  --clr-dashed: #888888;
  --border-subtle: rgba(0, 0, 0, 0.06);

  /* Layout */
  --content-width: 580px;
  --page-pad: 24px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.menu-open {
  overflow: hidden;
}

/* ── Typography ────────────────────────────────────────── */
h1, h2, h3 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  line-height: 1.15;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  letter-spacing: -0.015em;
}

h2 {
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  margin-bottom: 12px;
}

h3 {
  font-size: clamp(1.15rem, 3vw, 1.4rem);
  margin-bottom: 8px;
}

a {
  color: inherit;
  text-decoration: none;
}

strong {
  font-weight: 700;
  color: var(--text-primary);
}

/* ── Accent Text ───────────────────────────────────────── */
.text-accent {
  color: var(--clr-accent);
}

.text-highlight {
  color: var(--clr-accent);
  text-decoration: underline;
  text-decoration-color: var(--clr-accent-light);
  text-underline-offset: 4px;
  text-decoration-thickness: 3px;
}

.handwritten {
  font-family: 'Caveat', cursive;
  font-size: 1.25em;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.3;
}

.handwritten-inline {
  font-family: 'Caveat', cursive;
  font-size: 1.15em;
  font-weight: 600;
  color: var(--clr-accent);
}

/* ── Layout ────────────────────────────────────────────── */
.page-wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

/* ── Navigation ────────────────────────────────────────── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-page);
}

.nav-name {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  position: relative;
  z-index: 100;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--clr-accent);
}

.nav-cta {
  background: var(--clr-accent) !important;
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 8px;
  transition: background 0.2s, transform 0.15s !important;
}

.nav-cta:hover {
  background: var(--clr-accent-hover) !important;
  transform: translateY(-1px);
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  position: relative;
  z-index: 100;
}

.toggle-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: all 0.3s;
}

.nav-overlay {
  display: none;
}

@media (max-width: 600px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  nav.is-open .toggle-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
  }

  nav.is-open .toggle-line:nth-child(2) {
    opacity: 0;
  }

  nav.is-open .toggle-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
  }

  .nav-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-page);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    z-index: 99;
  }

  nav.is-open ~ .nav-overlay,
  nav.is-open .nav-overlay {
    display: flex;
  }

  .nav-overlay a {
    font-family: 'DM Serif Display', serif;
    font-size: 1.8rem;
    color: var(--text-primary);
    transition: color 0.2s;
  }

  .nav-overlay a:hover {
    color: var(--clr-accent);
  }
}

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  padding: 80px 0 48px;
  text-align: center;
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--clr-accent);
  margin-bottom: 20px;
}

.hero h1 {
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 460px;
  margin: 0 auto 28px;
  line-height: 1.65;
}

.hero-sticky {
  margin: 24px 0 32px;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Buttons ───────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 28px;
  background: var(--clr-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--clr-accent-hover);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 28px;
  background: transparent;
  color: var(--clr-accent);
  border: 2px solid var(--clr-accent);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}

.btn-outline:hover {
  background: var(--clr-accent-light);
  transform: translateY(-1px);
}

/* ── Sticky Note ───────────────────────────────────────── */
.sticky-note {
  display: inline-block;
  background: var(--clr-sticky);
  border: 1px solid var(--clr-sticky-border);
  padding: 12px 20px;
  font-family: 'Caveat', cursive;
  font-size: 1.25em;
  font-weight: 600;
  color: var(--text-secondary);
  transform: rotate(-1.5deg);
  box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.08);
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.sticky-note:hover {
  transform: rotate(-1deg) translateY(-3px);
  box-shadow: 3px 5px 12px rgba(0, 0, 0, 0.12);
}

.sticky-note::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(2deg);
  width: 44px;
  height: 14px;
  background: var(--clr-tape);
  opacity: 0.65;
  border-radius: 1px;
}

/* ── Dashed Arrow ──────────────────────────────────────── */
.dashed-arrow {
  display: inline-block;
  border-top: 2px dashed var(--clr-dashed);
  width: 50px;
  margin: 0 6px;
  vertical-align: middle;
}

/* ── Washi Tape ────────────────────────────────────────── */
.tape {
  position: absolute;
  top: -9px;
  right: 24px;
  width: 54px;
  height: 16px;
  opacity: 0.6;
  border-radius: 1px;
  z-index: 2;
}

.tape-green {
  background: var(--clr-tape);
  transform: rotate(3deg);
}

.tape-tan {
  background: var(--clr-tape-alt);
  transform: rotate(-2deg);
}

/* ── Sections ──────────────────────────────────────────── */
.section {
  padding: 56px 0;
  border-top: 1px solid var(--border-subtle);
}

.section-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--clr-accent);
  margin-bottom: 8px;
}

.section-intro {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 480px;
}

/* ── Service Cards ─────────────────────────────────────── */
.service-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 28px 24px;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.card-num {
  font-family: 'Caveat', cursive;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--clr-accent);
  margin-bottom: 4px;
  opacity: 0.7;
}

.service-card h3 {
  margin-bottom: 8px;
}

.service-card > p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 12px;
}

.card-quote {
  margin: 16px 0;
  padding: 10px 16px;
  background: var(--bg-surface);
  border-left: 3px solid var(--clr-accent-light);
  border-radius: 0 8px 8px 0;
}

.card-quote .handwritten {
  font-size: 1.1em;
  font-style: italic;
  color: var(--text-secondary);
}

.service-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.service-list li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding-left: 20px;
  position: relative;
}

.service-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--clr-tape);
  font-weight: 700;
  font-size: 0.8em;
}

/* ── Philosophy Grid ───────────────────────────────────── */
.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.philosophy-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 24px 20px;
  position: relative;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.philosophy-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  transition: transform 0.25s ease;
}

.philosophy-card:hover .card-icon {
  transform: scale(1.1) rotate(-2deg);
}

.card-icon img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  flex-shrink: 0;
}

.card-icon svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.philosophy-card h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.philosophy-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

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

/* ── CTA Section ───────────────────────────────────────── */
.cta-section {
  text-align: center;
  padding: 64px 0;
}

.cta-section h2 {
  max-width: 440px;
  margin: 0 auto 12px;
}

.cta-section .section-intro {
  max-width: 400px;
  margin: 0 auto 28px;
}

.cta-methods {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cta-annotation {
  margin-top: 20px;
  color: var(--text-muted);
}

/* ── Footer ────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border-subtle);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-right a {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 20px;
  transition: color 0.2s;
}

.footer-right a:hover {
  color: var(--clr-accent);
}

.footer-legal {
  padding: 16px 0 48px;
  text-align: center;
}

.footer-legal p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.page-counter {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* ── Scroll Reveal Animations ──────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger child cards */
.service-card.reveal:nth-child(1) { transition-delay: 0s; }
.service-card.reveal:nth-child(2) { transition-delay: 0.08s; }
.service-card.reveal:nth-child(3) { transition-delay: 0.16s; }
.service-card.reveal:nth-child(4) { transition-delay: 0.24s; }
.service-card.reveal:nth-child(5) { transition-delay: 0.32s; }

.philosophy-card.reveal:nth-child(1) { transition-delay: 0s; }
.philosophy-card.reveal:nth-child(2) { transition-delay: 0.08s; }
.philosophy-card.reveal:nth-child(3) { transition-delay: 0.16s; }
.philosophy-card.reveal:nth-child(4) { transition-delay: 0.24s; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 600px) {
  :root {
    --page-pad: 20px;
  }

  .hero {
    padding: 56px 0 36px;
  }

  .hero-ctas {
    flex-direction: column;
  }

  .btn-primary, .btn-outline {
    width: 100%;
    justify-content: center;
  }

  .cta-methods {
    flex-direction: column;
  }
}
