/* ==========================================================================
   PERUR INC — Core Stylesheet
   Design system: graphite surface, dual status-accent (amber/teal),
   Manrope (display) / Inter (body) / IBM Plex Mono (utility-labels)
   ========================================================================== */

:root {
  /* ---- Color tokens (light theme — sky/rose pastel) ---- */
  --graphite-0: #bae6fd;   /* section-alt / footer band — sky blue */
  --graphite-1: #f0f9ff;   /* base page bg */
  --graphite-2: #ffffff;   /* card / surface */
  --graphite-3: #e0f2fe;   /* elevated / hover surface */
  --line: #bae6fd;         /* borders */
  --line-soft: rgba(3, 105, 161, 0.06);

  --ink: #0c1a2e;          /* primary text */
  --ink-dim: #4a6580;      /* secondary text */
  --ink-faint: #90a8bf;    /* tertiary / placeholder */

  --amber: #be185d;        /* accent — rose/pink */
  --amber-dim: rgba(190, 24, 93, 0.13);
  --teal: #0369a1;         /* accent — deep sky blue */
  --teal-dim: rgba(3, 105, 161, 0.13);

  --gradient-signal: linear-gradient(120deg, #38bdf8 0%, #f472b6 100%);

  /* ---- Type ---- */
  --font-display: "Manrope", "Inter", sans-serif;
  --font-body: "Inter", -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", monospace;

  /* ---- Layout ---- */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --container-max: 1180px;
  --nav-height: 76px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset / base ---- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
}

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

body {
  background: var(--graphite-1);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle base texture: faint grid, grounded in "infra blueprint" feel */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 0%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

p { margin: 0 0 1rem; color: var(--ink-dim); }
a { color: inherit; text-decoration: none; transition: color 0.2s var(--ease); }

.container { max-width: var(--container-max); }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Eyebrow / mono labels (the recurring "tag" device) ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.9rem;
  text-transform: lowercase;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-dim);
  flex-shrink: 0;
}

.eyebrow.amber { color: var(--amber); }
.eyebrow.amber::before { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-dim); }

/* ---- Section rhythm ---- */
.section { padding: 7rem 0; position: relative; z-index: 1; }
.section-tight { padding: 4.5rem 0; position: relative; z-index: 1; }
.section-alt { background: var(--graphite-0); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 640px; margin-bottom: 3.5rem; }
.section-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); margin-bottom: 1rem; }
.section-head p { font-size: 1.05rem; }

@media (max-width: 767px) {
  .section { padding: 4.5rem 0; }
}

/* ---- Buttons ---- */
.btn-signal {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  background: var(--gradient-signal);
  color: #0b0f14;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  box-shadow: 0 0 0 0 rgba(45, 212, 191, 0);
}
.btn-signal:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(3, 105, 161, 0.30);
  color: #0b0f14;
}

.btn-ghost {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  transition: all 0.25s var(--ease);
}
.btn-ghost:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-dim);
}

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
}
.navbar.is-scrolled {
  background: rgba(240, 249, 255, 0.88);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--ink);
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient-signal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: #0b0f14;
  flex-shrink: 0;
}
.brand .dot { color: var(--teal); }

.nav-links { gap: 2.1rem; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--ink-dim);
  position: relative;
  padding: 0.4rem 0;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--teal); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: var(--teal);
}

.navbar-toggler {
  border: 1px solid var(--line);
  background: var(--graphite-2);
}
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler-icon {
  background-image: none;
  position: relative;
  width: 20px; height: 14px;
}
.navbar-toggler-icon::before, .navbar-toggler-icon::after, .navbar-toggler-icon span {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--ink);
}
.navbar-toggler-icon::before { top: 0; }
.navbar-toggler-icon span { top: 6px; }
.navbar-toggler-icon::after { top: 12px; }

@media (max-width: 991px) {
  .nav-links {
    background: var(--graphite-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    margin-top: 1rem;
    gap: 0.9rem !important;
  }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  padding: calc(var(--nav-height) + 5rem) 0 6rem;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -10%; right: -10%;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.hero-glow.amber {
  top: 30%; left: -15%; right: auto;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.12) 0%, transparent 65%);
}

.hero h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.8rem);
  margin-bottom: 1.4rem;
}
.hero h1 .accent {
  background: var(--gradient-signal);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-lead {
  font-size: 1.15rem;
  max-width: 540px;
  color: var(--ink-dim);
}
.hero-cta { display: flex; gap: 1rem; margin-top: 2.2rem; flex-wrap: wrap; }

.hero-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2.6rem; }
.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
}

/* ---- Glass / service cards ---- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 991px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .card-grid { grid-template-columns: 1fr; } }

.service-card {
  background: var(--graphite-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  height: 100%;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--teal);
  background: var(--graphite-3);
}
.service-card .icon {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--teal-dim);
  color: var(--teal);
  font-size: 1.25rem;
  margin-bottom: 1.1rem;
}
.service-card h3 {
  font-size: 1.12rem;
  margin-bottom: 0.6rem;
}
.service-card p { font-size: 0.93rem; margin-bottom: 0; }
.service-card .tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
  position: absolute;
  top: 1.8rem; right: 1.8rem;
}

/* ---- Detailed service section (services.html) ---- */
.service-detail {
  border-top: 1px solid var(--line);
  padding: 4rem 0;
}
.service-detail:first-of-type { border-top: none; }
.service-detail-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-sm);
  background: var(--graphite-2);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  color: var(--teal);
  margin-bottom: 1.3rem;
}
.service-detail h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 0.9rem; }
.feature-list { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.96rem;
  color: var(--ink-dim);
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--line);
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li::before {
  content: "▸";
  color: var(--amber);
  flex-shrink: 0;
  font-family: var(--font-mono);
}

/* ---- Process steps (about.html — genuinely sequential) ---- */
.process-track { position: relative; }
.process-step {
  display: flex;
  gap: 1.5rem;
  padding-bottom: 2.6rem;
  position: relative;
}
.process-step:last-child { padding-bottom: 0; }
.process-step::before {
  content: "";
  position: absolute;
  left: 23px; top: 52px; bottom: 0;
  width: 1px;
  background: var(--line);
}
.process-step:last-child::before { display: none; }
.process-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--graphite-1);
  background: var(--gradient-signal);
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
}
.process-step h4 { font-size: 1.08rem; margin-bottom: 0.4rem; }
.process-step p { font-size: 0.93rem; margin-bottom: 0; max-width: 480px; }

/* ---- Values cards ---- */
.value-card {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}
.value-card:last-child { border-bottom: none; }
.value-card h4 {
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.value-card h4 .idx { font-family: var(--font-mono); color: var(--amber); font-size: 0.85rem; }
.value-card p { font-size: 0.93rem; margin-bottom: 0; }

/* ---- Stack / tech pills ---- */
.stack-pill {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.stack-pill::before { content: "›"; color: var(--teal); }

/* ---- CTA band ---- */
.cta-band {
  background: var(--graphite-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1rem; }
.cta-band p { max-width: 480px; margin: 0 auto 1.8rem; }

/* ---- Forms ---- */
.form-control-dark {
  background: var(--graphite-2);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  width: 100%;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.form-control-dark:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--graphite-3);
}
.form-control-dark::placeholder { color: var(--ink-faint); }
.form-label-mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-bottom: 0.5rem;
  display: block;
}
.form-note {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-faint);
  margin-top: 0.6rem;
}
.form-success {
  display: none;
  background: var(--teal-dim);
  border: 1px solid var(--teal);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--teal);
  margin-top: 1.2rem;
}

.contact-info-card {
  background: var(--graphite-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.6rem;
}
.contact-info-row {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.contact-info-row:last-child { border-bottom: none; }
.contact-info-row .icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--amber-dim);
  color: var(--amber);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}
.contact-info-row h5 { font-size: 0.85rem; color: var(--ink-faint); font-family: var(--font-mono); margin-bottom: 0.25rem; font-weight: 500; }
.contact-info-row p { font-size: 0.94rem; margin-bottom: 0; color: var(--ink); }

/* ---- Footer ---- */
.site-footer {
  background: var(--graphite-0);
  border-top: 1px solid var(--line);
  padding: 4.5rem 0 1.8rem;
  position: relative;
  z-index: 1;
}
.footer-brand p { max-width: 280px; font-size: 0.9rem; }
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
  text-transform: lowercase;
  margin-bottom: 1.1rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.7rem; }
.footer-col a { color: var(--ink-dim); font-size: 0.92rem; }
.footer-col a:hover { color: var(--teal); }
.footer-social { display: flex; gap: 0.7rem; margin-top: 1.4rem; }
.footer-social a {
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-dim);
  transition: all 0.2s var(--ease);
}
.footer-social a:hover { border-color: var(--teal); color: var(--teal); }
.footer-bottom {
  margin-top: 3.5rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-faint);
}
.footer-bottom a { color: var(--ink-faint); }
.footer-bottom a:hover { color: var(--teal); }

/* ---- Back to top ---- */
.back-to-top {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--graphite-2);
  border: 1px solid var(--line);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s var(--ease);
  z-index: 999;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { border-color: var(--teal); color: var(--teal); }

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---- Page header (inner pages) ---- */
.page-header {
  padding: calc(var(--nav-height) + 4rem) 0 3.5rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.page-header h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.page-header p { max-width: 560px; font-size: 1.05rem; margin-top: 1rem; }

/* ---- Legal / prose (privacy policy) ---- */
.prose h2 {
  font-size: 1.3rem;
  margin-top: 2.6rem;
  margin-bottom: 0.9rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}
.prose h2:first-child { padding-top: 0; border-top: none; margin-top: 0; }
.prose p, .prose li { color: var(--ink-dim); font-size: 0.97rem; }
.prose ul { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.5rem; }
.prose strong { color: var(--ink); }
.prose-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-bottom: 2.5rem;
}

/* ---- Misc ---- */
.text-teal { color: var(--teal) !important; }
.text-amber { color: var(--amber) !important; }
.divider { height: 1px; background: var(--line); border: none; margin: 0; }
