/* site/style.css — NexLo website
   Tokens: ../brand-tokens.css (.dir-node on <body>)
   No hardcoded brand values — everything via var(--*)
*/

/* ── Base ─────────────────────────────────────────── */

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Header / Nav ─────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 0.25s ease;
}

.site-header.scrolled {
  box-shadow: 0 2px 16px rgba(20, 17, 13, 0.07);
}

.site-nav {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.nav-mark {
  display: block;
  flex-shrink: 0;
}

.nav-wordmark {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--ink);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: 48px;
}

.nav-link {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link-accent {
  color: var(--accent);
}

.nav-link-accent:hover {
  color: var(--accent);
  opacity: 0.8;
}


.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  margin-left: auto;
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile menu ─────────────────────────────────── */

.mobile-menu {
  display: none;
  position: fixed;
  inset: 64px 0 0 0;
  background: var(--paper);
  z-index: 99;
  padding: 40px 32px;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 1px solid var(--rule);
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
}

.mobile-nav a {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--ink);
  text-decoration: none;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  transition: color 0.15s ease;
}

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

.mobile-nav .mobile-cta {
  color: var(--accent);
  border-bottom: none;
  margin-top: 36px;
  font-size: 20px;
}

/* ── Hero ──────────────────────────────────────────── */

.hero {
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  min-height: calc(100vh - 64px);
}

/* Left column */

.hero-left {
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 48px;
}

.hero-left-content {
  max-width: 540px;
  width: 100%;
  padding: 72px 0;
}

.hero-label {
  margin: 0 0 20px;
}

.hero-headline {
  font-family: var(--display);
  font-size: clamp(48px, 5.5vw, 72px);
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 0.95;
  color: var(--ink);
  margin: 0 0 22px;
}

.headline-accent {
  color: var(--accent);
}

.hero-sub {
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 440px;
  margin: 0 0 32px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--paper);
  background: var(--ink);
  text-decoration: none;
  padding: 13px 22px;
  transition: opacity 0.15s ease, transform 0.2s ease;
}

.cta-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.cta-btn-secondary {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  text-decoration: none;
  padding: 12px 20px;
  transition: background 0.15s ease, color 0.15s ease;
}

.cta-btn-secondary:hover {
  background: var(--ink);
  color: var(--paper);
}

/* Stats row */

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}

.hero-stat {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-top: 16px;
}

.hero-stat svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.hero-stat > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hero-stat-value {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--ink);
  line-height: 1;
}

/* Right column — dark panel */

.hero-right {
  background: var(--ink);
  position: relative;
  overflow: hidden;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}


/* ── Services ──────────────────────────────────────── */

.services {
  background: var(--paper-2);
  padding: 100px 0;
}

.section-header {
  margin-bottom: 48px;
}

.section-label {
  margin: 0 0 6px;
}

.section-title {
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.8px;
  color: var(--ink);
  margin: 0;
  line-height: 1.15;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.service-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 3px solid transparent;
  border-radius: 10px;
  padding: 32px 28px 28px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-left-color 0.22s ease;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(20, 17, 13, 0.07);
  border-left-color: var(--accent);
}

.service-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 20px;
  color: var(--ink);
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-name {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--ink);
  margin: 0 0 8px;
}

.service-desc {
  font-family: var(--display);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
}

/* ── About ─────────────────────────────────────────── */

.about {
  background: var(--paper);
  padding: 100px 0;
}

.about-inner {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 80px;
  align-items: start;
}

.about-portrait {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: center top;
  border-radius: 8px;
  display: block;
}

.about-text {
  border-left: 3px solid var(--accent);
  padding-left: 36px;
}

.about-text .section-label {
  margin-bottom: 6px;
}

.about-text .section-title {
  margin-bottom: 24px;
}

.about-body {
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0 0 16px;
  max-width: 520px;
}

.about-zone {
  display: block;
  margin-top: 32px;
}

/* ── Contact ───────────────────────────────────────── */

.contact {
  background: var(--ink);
  padding: 100px 0;
}

.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 700px;
}

.contact-label {
  color: rgba(245, 241, 234, 0.35);
  margin: 0 0 6px;
}

.contact-headline {
  font-family: var(--display);
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.08;
  color: var(--paper);
  margin: 0 0 56px;
}


/* ── Contact form ──────────────────────────────────── */

.contact-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  color: rgba(245, 241, 234, 0.45);
}

.form-input {
  font-family: var(--display);
  font-size: 14px;
  color: var(--paper);
  background: rgba(245, 241, 234, 0.07);
  border: 1px solid rgba(245, 241, 234, 0.15);
  border-radius: 6px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.form-input::placeholder {
  color: rgba(245, 241, 234, 0.25);
}

.form-input:focus {
  border-color: var(--accent);
  background: rgba(245, 241, 234, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--paper);
  background: var(--accent);
  border: none;
  border-radius: 100px;
  padding: 14px 28px;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.2s ease;
}

.form-submit:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(245,241,234,0.4)' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

select.form-input option {
  background: var(--ink);
  color: var(--paper);
}

.time-options {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.time-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(245, 241, 234, 0.7);
  font-family: var(--display);
  font-size: 14px;
  cursor: pointer;
}

.time-options input[type="radio"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.optional-note {
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(245, 241, 234, 0.35);
  font-weight: 400;
  letter-spacing: 0.04em;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .time-options {
    flex-direction: column;
    gap: 12px;
  }
}

/* ── Form success state ────────────────────────────── */

.form-success {
  width: 100%;
}

.form-success-body {
  font-family: var(--display);
  font-size: 16px;
  color: rgba(245, 241, 234, 0.65);
  line-height: 1.6;
  margin: 0 0 20px;
}

.form-success-fallback {
  margin: 0;
  color: rgba(245, 241, 234, 0.35);
}

.form-success-fallback a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

.form-error {
  color: var(--accent);
  margin: 12px 0 0;
  font-size: 11px;
  letter-spacing: 0.04em;
}

/* ── Privacy notice trigger ────────────────────────── */

.form-privacy-note {
  margin: 0;
  color: rgba(245, 241, 234, 0.35);
  font-size: 11px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.privacy-link {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(245, 241, 234, 0.5);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

.privacy-link:hover {
  color: var(--paper);
}

/* ── Privacy modal ─────────────────────────────────── */

.privacy-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 17, 13, 0.75);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  animation: overlay-in 0.2s ease;
}

.privacy-overlay[hidden] {
  display: none;
}

@keyframes overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.privacy-panel {
  background: var(--paper);
  color: var(--ink);
  border-radius: 8px;
  padding: 40px 40px 36px;
  max-width: 580px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: panel-in 0.2s ease;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.privacy-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: rgba(20, 17, 13, 0.45);
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
  line-height: 0;
}

.privacy-close:hover {
  color: var(--ink);
  background: var(--paper-2);
}

.privacy-title {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--ink);
  margin: 0 0 4px;
}

.privacy-updated {
  color: rgba(20, 17, 13, 0.4);
  font-size: 11px;
  margin: 0 0 28px;
}

.privacy-panel h3 {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 24px 0 6px;
}

.privacy-panel p {
  font-family: var(--display);
  font-size: 14px;
  line-height: 1.6;
  color: rgba(20, 17, 13, 0.8);
  margin: 0;
}

.privacy-panel a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.privacy-panel a:hover {
  color: var(--accent);
}

@media (max-width: 600px) {
  .privacy-panel {
    padding: 28px 20px 24px;
    max-height: 90vh;
  }
}

/* ── Footer ────────────────────────────────────────── */

.site-footer {
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  padding: 22px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.footer-wordmark {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--ink);
}

.footer-copy {
  margin: 0;
  color: var(--muted);
}

/* ── Back to top ───────────────────────────────────── */

.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--paper);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.15s ease;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--ink);
}

/* ── Reveal animations ─────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

/* ── Responsive ────────────────────────────────────── */

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

  .nav-actions {
    display: none;
  }

  .nav-burger {
    display: flex;
  }

  .mobile-menu {
    display: block;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    min-height: calc(100svh - 64px);
    position: relative;
  }

  /* ── [MOBILE HERO BG — experiment] ──────────────────
     Rollback: replace this block with the original below.
     Original:
       .hero-inner { grid-template-columns: 1fr; min-height: unset; }
       .hero-left  { justify-content: flex-start; padding: 0 20px; }
       .hero-right { display: none; }
  ── */
  .hero-right {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 0;
  }

  .hero-left {
    justify-content: flex-start;
    padding: 0 20px;
    position: relative;
    z-index: 1;
    background: rgba(245, 241, 234, 0.86);
  }
  /* ── [/MOBILE HERO BG — experiment] ─────────────── */

  .hero-left-content {
    padding: 56px 0;
    max-width: 100%;
  }

  .hero-headline {
    font-size: clamp(40px, 10vw, 60px);
    letter-spacing: -1.2px;
    line-height: 1;
  }

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

  .about-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-portrait {
    aspect-ratio: 1;
    max-width: 200px;
    object-position: center 20%;
  }

  .about-text {
    border-left: none;
    border-top: 3px solid var(--accent);
    padding-left: 0;
    padding-top: 28px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 20px;
  }

  .services {
    padding: 72px 0;
  }

  .about {
    padding: 72px 0;
  }

  .contact {
    padding: 72px 0;
  }

  .service-card {
    padding: 24px 20px;
  }
}
