/* =========================================================
   Harsh Dubey — AI Automation & Website Developer
   Stylesheet
   ========================================================= */

:root {
  /* Color */
  --paper: #FAF8F4;
  --paper-dim: #F2EFE7;
  --ink: #191712;
  --ink-soft: #38352C;
  --stone: #6E6A61;
  --stone-light: #948F83;
  --line: #E6E2D8;
  --line-strong: #D6D1C2;
  --gold: #B9872E;
  --gold-deep: #8F681F;
  --gold-tint: #F3E7D2;
  --white: #FFFFFF;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;

  /* Scale */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.4vw, 1.35rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.8vw, 1.85rem);
  --step-3: clamp(1.9rem, 1.6rem + 1.4vw, 2.5rem);
  --step-4: clamp(2.4rem, 1.9rem + 2.2vw, 3.4rem);
  --step-5: clamp(3rem, 2.2rem + 3.6vw, 4.6rem);

  /* Layout */
  --container: 1160px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius-s: 4px;
  --radius-m: 8px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@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 {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; margin: 0; color: var(--ink); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: inherit; }

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

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: 0 0 var(--radius-s) 0;
}
.skip-link:focus { left: 0; }

section { position: relative; }

.section-inner { padding-block: clamp(4rem, 8vw, 7rem); }
.section-head {
  max-width: 640px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head.center { margin-inline: auto; text-align: center; }
.section-kicker {
  display: block;
  font-size: var(--step--1);
  color: var(--gold-deep);
  font-weight: 600;
  margin-bottom: 0.9rem;
  letter-spacing: 0.01em;
}
.section-head h2 { font-size: var(--step-3); letter-spacing: -0.01em; }
.section-head p { margin-top: 1rem; color: var(--stone); font-size: var(--step-1); }

.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-s);
  font-size: var(--step--1);
  font-weight: 600;
  border: 1px solid transparent;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn-primary:hover { background: var(--gold-deep); border-color: var(--gold-deep); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-secondary:hover { border-color: var(--ink); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
}
.btn-ghost:hover { border-color: var(--gold-deep); color: var(--gold-deep); }
.btn-whatsapp {
  background: var(--paper-dim);
  color: var(--ink);
  border-color: var(--line);
}
.btn-whatsapp:hover { border-color: var(--gold); color: var(--gold-deep); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ---------- Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.1rem;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.nav-logo span { color: var(--gold-deep); }
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 2vw, 2.2rem);
}
.nav-links a {
  font-size: var(--step--1);
  color: var(--ink-soft);
  padding: 0.3rem 0.1rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); border-color: var(--gold); }
.nav-cta { display: flex; align-items: center; gap: 0.9rem; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.4rem;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 99;
  padding: 6rem var(--gutter) 2rem;
  flex-direction: column;
  gap: 0.5rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: 1.6rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.mobile-menu .btn { margin-top: 1.5rem; align-self: flex-start; }
body.menu-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero { overflow: hidden; }
.hero .section-inner {
  padding-top: clamp(3.5rem, 8vw, 6rem);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--step--1);
  color: var(--stone);
  margin-bottom: 1.6rem;
  padding: 0.4rem 0.85rem 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.hero-status .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-tint);
}
.hero h1 {
  font-size: var(--step-5);
  letter-spacing: -0.02em;
  max-width: 14ch;
}
.hero-lede {
  margin-top: 1.5rem;
  max-width: 46ch;
  font-size: var(--step-1);
  color: var(--stone);
}
.hero-ctas {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Workflow visual */
.workflow-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: clamp(1.5rem, 3vw, 2rem);
}
.workflow-title {
  font-size: var(--step--1);
  color: var(--stone);
  margin-bottom: 1.4rem;
}
.workflow-steps { display: flex; flex-direction: column; }
.workflow-step {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding-block: 0.7rem;
}
.workflow-step .node {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--paper);
  transition: border-color 0.5s var(--ease), background 0.5s var(--ease);
}
.workflow-step .node svg { width: 17px; height: 17px; color: var(--ink-soft); }
.workflow-step .label { font-size: var(--step-0); font-weight: 500; }
.workflow-step .sub { display: block; font-size: var(--step--1); color: var(--stone-light); margin-top: 0.15rem; }
.workflow-connector {
  width: 1px;
  height: 22px;
  background: var(--line-strong);
  margin-left: 17.5px;
}
.workflow-step.is-active .node {
  border-color: var(--gold);
  background: var(--gold-tint);
}
.workflow-step.is-active .node svg { color: var(--gold-deep); }
.workflow-connector.is-active { background: var(--gold); }

/* ---------- Problem / Value ---------- */
.problem { background: var(--paper-dim); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.problem h2 { font-size: var(--step-3); max-width: 16ch; }
.problem-list { display: flex; flex-direction: column; }
.problem-item {
  display: flex;
  gap: 1rem;
  padding-block: 1.1rem;
  border-top: 1px solid var(--line);
}
.problem-item:last-child { border-bottom: 1px solid var(--line); }
.problem-item svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 0.2rem; color: var(--gold-deep); }
.problem-item p { color: var(--ink-soft); }

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
}
.service-card {
  padding: clamp(1.6rem, 3vw, 2.2rem);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 0.25s var(--ease);
}
.services-grid .service-card:nth-child(3n) { border-right: none; }
.services-grid .service-card:nth-last-child(-n+3) { border-bottom: none; }
.service-card:hover { background: var(--paper-dim); }
.service-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.2rem;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.service-icon svg { width: 18px; height: 18px; color: var(--ink-soft); }
.service-card:hover .service-icon { border-color: var(--gold); background: var(--gold-tint); }
.service-card:hover .service-icon svg { color: var(--gold-deep); }
.service-card h3 { font-size: var(--step-1); margin-bottom: 0.6rem; }
.service-card p { color: var(--stone); font-size: var(--step--1); margin-bottom: 0.9rem; }
.service-use {
  font-size: var(--step--1);
  color: var(--ink-soft);
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}
.service-use b { font-weight: 600; color: var(--gold-deep); }

/* ---------- Process ---------- */
.process { background: var(--ink); color: var(--paper); }
.process .section-kicker { color: var(--gold); }
.process .section-head h2 { color: var(--paper); }
.process .section-head p { color: #B7B2A4; }
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 2rem);
}
.process-step { border-top: 1px solid #3A3629; padding-top: 1.5rem; }
.process-num {
  font-family: var(--font-display);
  font-size: var(--step-3);
  color: var(--gold);
  display: block;
  margin-bottom: 1rem;
}
.process-step h3 { color: var(--paper); font-size: var(--step-1); margin-bottom: 0.6rem; }
.process-step p { color: #B7B2A4; font-size: var(--step--1); }

/* ---------- Work / Portfolio ---------- */
.work-grid { display: flex; flex-direction: column; gap: 1.5rem; }
.work-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--white);
  text-align: left;
  width: 100%;
  transition: border-color 0.25s var(--ease);
}
.work-card:hover { border-color: var(--gold); }
.work-visual {
  aspect-ratio: 4/3;
  border-radius: var(--radius-s);
  background: var(--paper-dim);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.work-visual svg { width: 60%; height: 60%; color: var(--stone-light); }
.work-tag {
  display: inline-block;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--gold-deep);
  background: var(--gold-tint);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}
.work-body h3 { font-size: var(--step-2); margin-bottom: 0.7rem; }
.work-body p { color: var(--stone); margin-bottom: 1rem; }
.work-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  margin-bottom: 1.2rem;
}
.work-features li {
  font-size: var(--step--1);
  color: var(--ink-soft);
  padding-left: 1rem;
  position: relative;
}
.work-features li::before {
  content: "";
  position: absolute; left: 0; top: 0.55em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold);
}

/* Case study modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(25, 23, 18, 0.55);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(1rem, 4vw, 4rem) 1rem;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--paper);
  max-width: 720px;
  width: 100%;
  border-radius: var(--radius-m);
  border: 1px solid var(--line-strong);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  position: relative;
}
.modal-close {
  position: absolute; top: 1.2rem; right: 1.2rem;
  background: none; border: none;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--stone);
}
.modal-close:hover { background: var(--paper-dim); color: var(--ink); }
.modal-close svg { width: 18px; height: 18px; }
.modal h3 { font-size: var(--step-2); margin: 0.5rem 2.5rem 1rem 0; }
.modal-section { margin-top: 1.5rem; }
.modal-section h4 {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--gold-deep);
  margin-bottom: 0.5rem;
}
.modal-section p, .modal-section li { color: var(--ink-soft); font-size: var(--step-0); }
.modal-section ul li { padding-left: 1rem; position: relative; margin-bottom: 0.3rem; }
.modal-section ul li::before {
  content: ""; position: absolute; left: 0; top: 0.6em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
}
.modal-flow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  font-size: var(--step--1); color: var(--ink-soft);
  margin-top: 0.5rem;
}
.modal-flow span.node {
  border: 1px solid var(--line-strong);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--white);
}
.modal-flow span.arrow { color: var(--stone-light); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.about-portrait {
  aspect-ratio: 3/4;
  background: var(--paper-dim);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  display: flex; align-items: center; justify-content: center;
  color: var(--stone-light);
  font-size: var(--step--1);
  text-align: center;
  padding: 1rem;
}
.about-copy p { color: var(--ink-soft); margin-bottom: 1.1rem; font-size: var(--step-1); }
.about-copy p:last-child { margin-bottom: 0; }

/* ---------- Toolkit ---------- */
.toolkit-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
}
.toolkit-group h4 {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--gold-deep);
  margin-bottom: 0.9rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}
.toolkit-group ul li {
  font-size: var(--step--1);
  color: var(--ink-soft);
  padding-block: 0.4rem;
}

/* ---------- Why work with me ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
}
.why-item { background: var(--white); padding: clamp(1.6rem, 3vw, 2.2rem); }
.why-item h3 { font-size: var(--step-1); margin-bottom: 0.6rem; }
.why-item p { color: var(--stone); font-size: var(--step--1); }

/* ---------- FAQ ---------- */
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-question {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.35rem;
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--step-1);
  color: var(--ink);
}
.faq-question .icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  position: relative;
}
.faq-question .icon::before, .faq-question .icon::after {
  content: "";
  position: absolute;
  background: var(--ink);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}
.faq-question .icon::before { top: 50%; left: 0; width: 100%; height: 1px; transform: translateY(-50%); }
.faq-question .icon::after { left: 50%; top: 0; height: 100%; width: 1px; transform: translateX(-50%); }
.faq-item.open .icon::after { transform: translateX(-50%) rotate(90deg); opacity: 0; }
.faq-item.open .icon::before { background: var(--gold-deep); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease);
}
.faq-answer p { color: var(--stone); padding-bottom: 1.35rem; max-width: 62ch; }

/* ---------- Contact ---------- */
.contact { background: var(--paper-dim); border-top: 1px solid var(--line); }
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.contact-info h2 { font-size: var(--step-3); max-width: 15ch; }
.contact-info p { color: var(--stone); margin-top: 1rem; max-width: 40ch; }
.contact-channels { margin-top: 2rem; display: flex; flex-direction: column; gap: 0.9rem; }
.contact-channel {
  display: flex; align-items: center; gap: 0.8rem;
  font-size: var(--step--1);
}
.contact-channel svg { width: 18px; height: 18px; color: var(--gold-deep); flex-shrink: 0; }

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form-field { margin-bottom: 1.1rem; }
.form-field label {
  display: block;
  font-size: var(--step--1);
  font-weight: 600;
  margin-bottom: 0.45rem;
}
.form-field .hint { font-weight: 400; color: var(--stone-light); }
.form-field input, .form-field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.2s var(--ease);
}
.form-field input:focus, .form-field textarea:focus {
  border-color: var(--gold-deep);
  outline: none;
}
.form-field textarea { resize: vertical; min-height: 110px; }
.form-status {
  margin-top: 1rem;
  font-size: var(--step--1);
  display: none;
}
.form-status.visible { display: block; }
.form-status.success { color: #4E6B3E; }
.form-status.error { color: #A5432D; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 2rem;
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
.footer-brand .nav-logo { display: block; margin-bottom: 0.6rem; }
.footer-brand p { color: var(--stone); font-size: var(--step--1); max-width: 34ch; }
.footer-col h4 { font-size: var(--step--1); font-weight: 600; margin-bottom: 0.9rem; }
.footer-col ul li { margin-bottom: 0.55rem; }
.footer-col a { font-size: var(--step--1); color: var(--stone); transition: color 0.2s var(--ease); }
.footer-col a:hover { color: var(--gold-deep); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-block: 1.4rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: var(--step--1);
  color: var(--stone-light);
}

/* ---------- Reveal-on-load orchestration ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .hero .section-inner { grid-template-columns: 1fr; }
  .problem-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-portrait { max-width: 260px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid .service-card:nth-child(3n) { border-right: 1px solid var(--line); }
  .services-grid .service-card:nth-child(2n) { border-right: none; }
  .services-grid .service-card:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .services-grid .service-card:nth-last-child(-n+2) { border-bottom: none; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .work-card { grid-template-columns: 1fr; }
  .work-visual { max-width: 340px; }
  .toolkit-grid { grid-template-columns: repeat(3, 1fr); }
  .why-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .nav-cta .btn-secondary { display: none; }
  .process-grid { grid-template-columns: 1fr; }
  .toolkit-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
}
