/* ─── RESET & BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:root {
  --bg:        #09090f;
  --surface:   #111118;
  --border:    rgba(255,255,255,0.07);
  --accent:    #e8420a;
  --accent2:   #ff6b35;
  --text:      #f0ede8;
  --muted:     #8a8796;
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --max:       1200px;
  --radius:    12px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ─── NOISE OVERLAY ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  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)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 9999;
}

/* ─── GLOW BLOBS ─── */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
}
.blob-1 { width: 600px; height: 600px; background: var(--accent); top: -200px; right: -150px; animation: drift 18s ease-in-out infinite alternate; }
.blob-2 { width: 400px; height: 400px; background: #1a3aff; bottom: 20%; left: -100px; animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(40px, 30px) scale(1.08); } }

/* ─── TYPOGRAPHY ─── */
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.1; letter-spacing: -0.02em; }
h1 { font-size: clamp(3rem, 7vw, 6.5rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { color: var(--muted); }
a { color: inherit; text-decoration: none; }

/* ─── LAYOUT ─── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 2rem; position: relative; z-index: 1; }
section { padding: 120px 0; }

/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.25rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(9,9,15,0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.nav-logo {
  display: flex;
  align-items: center;
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.nav-logo span { color: var(--accent); }

/* ── Alemik SVG Logo ── */
.alemik-logo {
  display: inline-block;
  position: relative;
}
.alemik-logo svg {
  display: block;
  overflow: visible;
}
/* The two arcs get transform-origin at center of the 500x500 viewBox */
.arc-top,
.arc-bottom {
  transform-origin: 250px 250px;
  transition: transform 0.9s cubic-bezier(0.76, 0, 0.24, 1);
}
.nav-links { display: flex; gap: 2.5rem; align-items: center; }

/* ─── HAMBURGER BUTTON ─── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 201;
  position: relative;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── NAV MOBILE OVERLAY ─── */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(9,9,15,0.6);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.nav-overlay.open { opacity: 1; pointer-events: auto; }
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 0.6rem 1.4rem;
  border-radius: 6px;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  font-size: 0.9rem !important;
  transition: background 0.2s, transform 0.15s !important;
}
.nav-cta:hover { background: var(--accent2) !important; transform: translateY(-1px); }

/* ─── HERO ─── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 100px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.hero-inner { max-width: 900px; margin: 0 auto; }
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(232,66,10,0.1);
  border: 1px solid rgba(232,66,10,0.25);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 2rem;
  animation: fadeUp 0.6s ease both;
}
.hero-tag::before { content: '●'; font-size: 0.5rem; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

h1.hero-title {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  animation: fadeUp 0.7s ease 0.1s both;
  margin-bottom: 1.5rem;
}
.hero-title em {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 400;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.3);
}
.hero-sub {
  font-size: 1.2rem;
  max-width: 600px;
  color: var(--muted);
  margin: 0 auto 3rem;
  animation: fadeUp 0.7s ease 0.2s both;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp 0.7s ease 0.3s both;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn-primary:hover {
  background: var(--accent2);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(232,66,10,0.35);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s;
}
.btn-secondary:hover { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.04); }

/* Animated grid lines */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 60% at 80% 50%, black, transparent);
  pointer-events: none;
}

/* ─── SANKEY SECTION ─── */
.sankey-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
  background: var(--surface);
}
.sankey-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 2rem;
}
#home-sankey {
  width: 100%;
  height: 280px;
}
.google-visualization-tooltip { display: none !important; }

/* ─── ABOUT / MISSION ─── */
#about .container {
  max-width: 720px;
}
.about-label {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1.2rem;
}
#about h2 { margin-bottom: 1.5rem; }
#about p { margin-bottom: 1.2rem; font-size: 1.05rem; }
.about-highlight {
  border-left: 2px solid var(--accent);
  padding: 1rem 1.5rem;
  background: rgba(232,66,10,0.05);
  border-radius: 0 8px 8px 0;
  margin-top: 2rem;
}
.about-highlight p { color: var(--text); font-size: 1rem; font-style: italic; }

/* ─── AI SECTION ─── */
#ai {
  position: relative;
}
#ai .container {
  max-width: 1280px;
}
.ai-shell {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(26,58,255,0.12), transparent 28%),
    linear-gradient(135deg, rgba(232,66,10,0.08), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 3.5rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.ai-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.45), transparent 80%);
  pointer-events: none;
}
.ai-header,
.ai-grid {
  position: relative;
  z-index: 1;
}
.ai-header {
  max-width: 900px;
  margin-bottom: 3rem;
  margin-inline: auto;
  text-align: center;
}
.ai-header h2 {
  max-width: 14ch;
  margin-bottom: 1rem;
  margin-inline: auto;
}
.ai-lead {
  max-width: 60ch;
  margin-inline: auto;
  font-size: 1.15rem;
  color: var(--text);
}
.ai-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
  gap: 2rem;
  align-items: start;
}
.ai-copy {
  display: grid;
  gap: 1.25rem;
}
.ai-copy p {
  font-size: 1.03rem;
  max-width: 66ch;
}
.ai-note {
  border-left: 2px solid rgba(255,255,255,0.2);
  padding: 1.1rem 0 1.1rem 1.5rem;
  margin: 0.25rem 0;
}
.ai-note p {
  color: var(--text);
  font-family: var(--font-head);
  font-size: 1.1rem;
  line-height: 1.5;
}
.ai-benefits {
  display: grid;
  gap: 1rem;
}
.ai-benefit-card {
  background: rgba(17,17,24,0.8);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 1.5rem;
  backdrop-filter: blur(14px);
}
.ai-benefit-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent2);
  font-weight: 700;
  margin-bottom: 0.9rem;
}
.ai-benefit-card h3 {
  margin-bottom: 0.6rem;
  font-size: 1.15rem;
}
.ai-benefit-card p {
  font-size: 0.95rem;
  line-height: 1.65;
}

/* visual side */
.about-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.3s, transform 0.3s;
}
.about-card:hover { border-color: rgba(232,66,10,0.35); transform: translateY(-4px); }
.about-card:first-child { grid-column: span 2; }
.about-card-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  display: block;
}
.about-card h4 { font-size: 0.95rem; margin-bottom: 0.4rem; color: var(--text); }
.about-card p { font-size: 0.85rem; }

/* ─── SERVICES ─── */
#services { background: var(--surface); }
#services .section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 4rem;
}
#services .section-header p { margin-top: 1rem; font-size: 1.1rem; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.service-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  transition: border-color 0.3s, transform 0.3s;
  position: relative;
}
.service-item:hover { border-color: rgba(232,66,10,0.35); transform: translateY(-4px); }
.service-num {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 1.2rem;
}
.service-item h3 { margin-bottom: 0.75rem; font-size: 1.1rem; }
.service-item p { font-size: 0.92rem; line-height: 1.65; }

/* ─── TESTIMONIALS ─── */
#testimonials .section-header {
  max-width: 540px;
  margin-bottom: 4rem;
}
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.3s, transform 0.3s;
  position: relative;
}
.testimonial-card:hover { border-color: rgba(255,255,255,0.12); transform: translateY(-3px); }
.testimonial-quote {
  font-size: 3rem;
  line-height: 1;
  color: var(--accent);
  font-family: Georgia, serif;
  margin-bottom: 1rem;
  opacity: 0.6;
}
.testimonial-text {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.testimonial-author {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ─── CASE STUDY ─── */
#case-study {
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.case-study-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 6rem;
  align-items: center;
}
.case-tag {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
}
#case-study h2 { margin-bottom: 1.5rem; }
#case-study p { margin-bottom: 1.2rem; font-size: 1.05rem; }
.case-pull {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
}

/* ─── CONTACT ─── */
#contact {
  text-align: center;
  position: relative;
  overflow: hidden;
}
.contact-glow {
  position: absolute;
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(232,66,10,0.12), transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
#contact .container { position: relative; z-index: 1; max-width: 700px; }
#contact h2 { margin-bottom: 1rem; }
#contact > .container > p { font-size: 1.1rem; margin-bottom: 3rem; }
.contact-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 3rem;
}
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.contact-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1.2rem;
  font-size: 0.95rem;
  color: var(--text);
  font-family: var(--font-body);
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}
.contact-input::placeholder { color: var(--muted); }
.contact-input:focus { border-color: rgba(232,66,10,0.5); }
.contact-input.full { grid-column: span 2; }
textarea.contact-input { resize: vertical; min-height: 130px; }
.contact-submit {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-body);
  margin-top: 0.5rem;
  transition: background 0.2s, transform 0.15s;
}
.contact-submit:hover { background: var(--accent2); transform: translateY(-1px); }
.contact-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.contact-input.input-error { border-color: #e8420a; background: rgba(232,66,10,0.06); }
.contact-phone-hint { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; margin-top: 1.25rem; color: var(--muted); font-size: 0.9rem; }
.contact-phone-label { color: var(--muted); }
.contact-phone-number { display: flex; align-items: center; gap: 0.45rem; color: var(--accent); font-weight: 600; font-size: 1.1rem; text-decoration: none; transition: color 0.2s; }
.contact-phone-number svg { flex-shrink: 0; }
.contact-phone-number:hover { color: var(--accent2); }
.contact-feedback { margin-top: 1rem; font-size: 0.95rem; border-radius: 8px; padding: 0; max-height: 0; overflow: hidden; transition: padding 0.2s, max-height 0.3s; }
.contact-feedback.feedback-ok,
.contact-feedback.feedback-err { padding: 0.75rem 1rem; max-height: 80px; }
.contact-feedback.feedback-ok  { background: rgba(40,200,100,0.1); color: #4eca7f; border: 1px solid rgba(40,200,100,0.25); }
.contact-feedback.feedback-err { background: rgba(232,66,10,0.1); color: #f07050; border: 1px solid rgba(232,66,10,0.25); }

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-logo {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.footer-logo span { color: var(--accent); }
.footer-meta { font-size: 0.82rem; color: var(--muted); margin-top: 0.3rem; }
.footer-contact { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.82rem; color: var(--muted); }
.footer-contact-name { font-weight: 600; color: var(--text); font-size: 0.88rem; }
.footer-contact a { color: var(--muted); transition: color 0.2s; }
.footer-contact a:hover { color: var(--text); }
.footer-links { display: flex; gap: 2rem; }
.footer-links a { font-size: 0.85rem; color: var(--muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 0.8rem; color: var(--muted); text-align: center; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }

/* ─── HERO LOGO ─── */
.hero-logo {
  margin-bottom: 2.5rem;
  animation: fadeUp 0.5s ease both;
  display: flex;
  justify-content: center;
}
.hero-logo .alemik-logo svg {
  width: 320px;
  height: auto;
}

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  #about .container, .case-study-inner { grid-template-columns: 1fr; gap: 3rem; }
  .about-visual { display: none; }
  .services-grid, .testimonials-grid { grid-template-columns: 1fr; }
  .ai-grid { grid-template-columns: 1fr; }
  .ai-shell { padding: 2rem; border-radius: 20px; }
  .ai-header h2, .ai-lead, .ai-copy p { max-width: none; }
  .nav-hamburger { display: none; }
  .nav-links { display: none; }
  #home-sankey { height: 220px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-input.full { grid-column: span 1; }
}
