/* ============================================
   Inq Ltd — Stylesheet
   Aesthetic: Technical Editorial
   Fonts: Syne (display) + DM Sans (body)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300;1,9..40,400&display=swap');

/* --- Custom properties --- */

:root {
  /* Shared palette */
  --accent: #c8963e;
  --accent-dim: #a07a32;
  --accent-glow: rgba(200, 150, 62, 0.15);

  /* Light theme (default) */
  --bg: #f4f0e8;
  --bg-secondary: #ece7dc;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #5a586e;
  --text-tertiary: #8a8898;
  --border: rgba(26, 26, 46, 0.1);
  --border-strong: rgba(26, 26, 46, 0.2);
  --svg-node: #1a1a2e;
  --svg-line: rgba(26, 26, 46, 0.12);
  --svg-dot: var(--accent);
  --toggle-bg: rgba(26, 26, 46, 0.08);
  --toggle-icon: var(--text-secondary);
  --noise-opacity: 0.025;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
  --hero-gradient: radial-gradient(ellipse 80% 60% at 70% 30%, rgba(200,150,62,0.07) 0%, transparent 70%);
}

[data-theme="dark"] {
  --bg: #0a0a10;
  --bg-secondary: #111118;
  --bg-card: #16161e;
  --text: #e8e4de;
  --text-secondary: #9a978e;
  --text-tertiary: #6a6860;
  --border: rgba(232, 228, 222, 0.08);
  --border-strong: rgba(232, 228, 222, 0.15);
  --svg-node: #e8e4de;
  --svg-line: rgba(232, 228, 222, 0.07);
  --svg-dot: var(--accent);
  --toggle-bg: rgba(232, 228, 222, 0.06);
  --toggle-icon: var(--text-secondary);
  --noise-opacity: 0.04;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 8px 24px rgba(0,0,0,0.3);
  --hero-gradient: radial-gradient(ellipse 80% 60% at 70% 30%, rgba(200,150,62,0.05) 0%, transparent 70%);
}

/* --- Reset & base --- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  transition: background 0.5s ease, color 0.5s ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* --- Typography --- */

h1, h2, h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--accent-dim);
}

/* --- Layout --- */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

section {
  padding: clamp(4rem, 10vw, 8rem) 0;
}

/* --- Navigation / Top bar --- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

.topbar.scrolled {
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text);
  letter-spacing: -0.03em;
  transition: color 0.5s ease;
}

.logo span {
  color: var(--accent);
}

/* Nav links */
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.topbar-nav a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color 0.2s ease;
  position: relative;
}

.topbar-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.topbar-nav a:hover {
  color: var(--text);
}

.topbar-nav a:hover::after {
  width: 100%;
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: var(--toggle-bg);
  color: var(--toggle-icon);
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.theme-toggle:hover {
  background: var(--accent-glow);
  color: var(--accent);
  transform: scale(1.05);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform 0.4s ease;
}

.theme-toggle:hover svg {
  transform: rotate(15deg);
}

.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

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

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.5s ease;
}

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

/* --- Hero --- */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 6rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-gradient);
  transition: background 0.5s ease;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  max-width: 560px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.7s ease 0.2s forwards;
}

.hero-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.7s ease 0.35s forwards;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-description {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.7s ease 0.5s forwards;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 2rem;
  background: var(--accent);
  color: #0a0a10;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.7s ease 0.65s forwards;
}

.hero-cta:hover {
  color: #0a0a10;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200, 150, 62, 0.25);
}

.hero-cta svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.hero-cta:hover svg {
  transform: translateX(3px);
}

/* Hero graphic */
.hero-graphic {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: fadeIn 1s ease 0.6s forwards;
}

.hero-svg {
  width: 100%;
  max-width: 480px;
  height: auto;
}

.hero-svg .node {
  fill: var(--svg-node);
  transition: fill 0.5s ease;
}

.hero-svg .line {
  stroke: var(--svg-line);
  transition: stroke 0.5s ease;
}

.hero-svg .dot {
  fill: var(--svg-dot);
  transition: fill 0.5s ease;
}

.hero-svg .pulse {
  fill: var(--accent);
  opacity: 0;
  animation: pulse 3s ease-in-out infinite;
}

.hero-svg .pulse:nth-child(2) { animation-delay: 1s; }
.hero-svg .pulse:nth-child(3) { animation-delay: 2s; }

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeIn 0.7s ease 1.2s forwards;
}

.scroll-indicator span {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: var(--border-strong);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--accent);
  animation: scrollDown 2s ease-in-out infinite;
}

/* --- Section headers --- */

.section-header {
  margin-bottom: 3.5rem;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--accent);
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 600px;
}

/* --- About --- */

.about {
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 1.5rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding-top: 0.5rem;
}

.stat-card {
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  transition: background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease, transform 0.25s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.stat-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 1rem;
  color: var(--accent);
}

.stat-card h3 {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
}

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

/* --- Services --- */

.services {
  border-top: 1px solid var(--border);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.service-card {
  padding: 2rem 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  transition: background 0.5s ease, border-color 0.3s ease, box-shadow 0.5s ease, transform 0.25s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-number {
  font-family: 'Syne', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.service-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.service-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Certifications --- */

.certifications {
  border-top: 1px solid var(--border);
}

.cert-strip {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  transition: background 0.5s ease, border-color 0.3s ease, box-shadow 0.5s ease, transform 0.25s ease;
  flex: 1 1 200px;
  min-width: 0;
}

.cert-badge:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.cert-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--accent);
}

.cert-badge .cert-name {
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.cert-badge .cert-detail {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* --- Contact --- */

.contact {
  border-top: 1px solid var(--border);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.contact-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  transition: color 0.2s ease;
  letter-spacing: -0.02em;
}

.contact-email:hover {
  color: var(--accent);
}

.contact-email svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.contact-availability {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--accent-glow);
  border: 1px solid rgba(200, 150, 62, 0.2);
  border-radius: 10px;
}

.contact-availability h3 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--accent);
}

.contact-availability p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

.contact-card {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  transition: background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.contact-card h3 {
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.contact-detail {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.contact-detail:last-child {
  margin-bottom: 0;
}

.contact-detail-label {
  color: var(--text-tertiary);
  min-width: 80px;
  flex-shrink: 0;
}

/* --- Footer --- */

.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-left {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.footer-right {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* --- Reveal animations --- */

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

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- Keyframes --- */

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 0; r: 3; }
  50% { opacity: 0.6; r: 8; }
}

@keyframes scrollDown {
  0% { top: -100%; }
  100% { top: 200%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* --- Responsive --- */

@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    max-width: 600px;
    margin: 0 auto;
  }

  .hero-description {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2.5rem;
  }

  .hero-graphic {
    display: none;
  }

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

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

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

@media (max-width: 768px) {
  .topbar-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 5rem 2rem 2rem;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    box-shadow: -8px 0 32px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.35s ease, background 0.5s ease;
    z-index: 200;
  }

  .topbar-nav.open {
    transform: translateX(0);
  }

  .topbar-nav a {
    font-size: 1rem;
    padding: 0.75rem 0;
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  .topbar-nav a::after {
    display: none;
  }

  .nav-toggle {
    display: flex;
    z-index: 300;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
  }

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

  .cert-strip {
    flex-direction: column;
  }

  .cert-badge {
    flex: 1 1 auto;
  }

  .section-header h2 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
  }

  .scroll-indicator {
    display: none;
  }
}

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

  .hero h1 {
    font-size: clamp(2.2rem, 8vw, 3rem);
  }

  .contact-email {
    font-size: 1.1rem;
  }
}

/* Auth indicator (header, top-right) */
.auth-links { display: none; align-items: center; gap: 0.5rem; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.03em; }
.auth-links.ready { display: flex; }
.auth-links a { color: var(--text-tertiary); text-decoration: none; transition: color 0.2s; white-space: nowrap; }
.auth-links a:hover { color: var(--text-secondary); }
[data-theme="dark"] .auth-links a { color: rgba(154, 151, 142, 0.55); }
[data-theme="dark"] .auth-links a:hover { color: var(--text-secondary); }
.auth-sep { width: 1px; height: 10px; background: var(--border-strong); display: inline-block; }
