/* =========================================================
   Avinesh Architects — shared site styles
   Palette: Crimson · Ink · Cream  (+ Stone neutral)
   Type:    Marcellus (display)  ·  Manrope (body)
   ========================================================= */

:root {
  --red:        #C8102E;
  --red-deep:   #9C0A22;
  --red-soft:   #E84A5F;
  --ink:        #141414;
  --ink-soft:   #2A2A2A;
  --stone:      #6E665C;
  --stone-soft: #B7AFA4;
  --cream:      #F4EFE8;
  --cream-deep: #E9E2D6;
  --paper:      #FBF8F3;
  --line:       rgba(20,20,20,0.12);

  --shadow-sm: 0 1px 2px rgba(20,20,20,0.06), 0 2px 6px rgba(20,20,20,0.04);
  --shadow-md: 0 6px 18px rgba(20,20,20,0.08), 0 2px 4px rgba(20,20,20,0.04);
  --shadow-lg: 0 30px 60px -20px rgba(20,20,20,0.25), 0 12px 24px -12px rgba(20,20,20,0.12);

  --display: "Marcellus", "Cormorant Garamond", Georgia, serif;
  --body: "Manrope", "DM Sans", system-ui, -apple-system, sans-serif;

  --max: 1280px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  font-weight: 400;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
  line-height: 1.1;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.5vw, 4.75rem); }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
h3 { font-size: clamp(1.4rem, 2.2vw, 1.85rem); }

.eyebrow {
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--red);
  display: inline-block;
}

p.lead {
  font-size: 1.15rem;
  color: var(--stone);
  max-width: 60ch;
  line-height: 1.55;
  text-wrap: pretty;
}

/* ---------- Layout helpers ---------- */
html, body { overflow-x: hidden; max-width: 100vw; }
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 2rem;
}
.section {
  padding: 7rem 0;
}
@media (max-width: 720px) {
  .section { padding: 4.5rem 0; }
  .wrap { padding: 0 1.25rem; }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(244, 239, 232, 0);
  transition: background 280ms ease, padding 280ms ease, box-shadow 280ms ease, border-color 280ms ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(251, 248, 243, 0.88);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  padding: 0.75rem 2rem;
  border-bottom: 1px solid var(--line);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  position: relative;
  z-index: 130;
}
.nav-brand img {
  height: 44px;
  width: auto;
  display: block;
}
.nav-brand-text {
  font-family: var(--display);
  font-size: 0.92rem;
  letter-spacing: 0.26em;
  color: var(--ink);
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
}
.nav-brand-text span { color: var(--red); margin: 0 0.3em; }
@media (max-width: 720px) {
  .nav-brand img { height: 36px; }
  .nav-brand-text { font-size: 0.78rem; letter-spacing: 0.22em; }
}
@media (max-width: 420px) {
  .nav-brand-text { display: none; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  position: relative;
  padding: 0.4rem 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--red);
  transition: width 220ms ease;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--red); }

.nav-cta {
  background: var(--ink);
  color: var(--cream);
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 200ms ease, transform 200ms ease;
}
.nav-cta:hover { background: var(--red); }

/* Burger toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 44px; height: 44px;
  padding: 0;
  position: relative;
  z-index: 130;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  margin: 5px auto;
  transition: transform 280ms cubic-bezier(.6,.05,.28,.91), opacity 200ms ease, background 200ms ease;
  transform-origin: center;
}

/* Full-screen mobile menu */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--ink);
  color: var(--cream);
  z-index: 120;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 2rem 4rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 320ms ease, transform 320ms ease, visibility 320ms;
  overflow-y: auto;
}
.mobile-menu::before {
  content: "";
  position: absolute;
  right: -100px; bottom: -100px;
  width: 360px; height: 360px;
  background: var(--red);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  opacity: 0.10;
  pointer-events: none;
}
.mobile-menu .mm-eyebrow {
  font-family: var(--body);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--red-soft);
  margin-bottom: 1.6rem;
  display: flex; align-items: center; gap: 0.7rem;
}
.mobile-menu .mm-eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--red-soft);
  display: inline-block;
}
.mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.mobile-menu li {
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 360ms ease, transform 360ms ease;
}
.mobile-menu a {
  font-family: var(--display);
  font-size: clamp(2rem, 8vw, 2.8rem);
  color: var(--cream);
  line-height: 1.15;
  padding: 0.4rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  position: relative;
  transition: color 200ms ease, transform 240ms ease;
}
.mobile-menu a::before {
  content: attr(data-num);
  font-family: var(--body);
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  color: rgba(244,239,232,0.4);
  font-weight: 500;
  align-self: flex-start;
  margin-top: 1.2rem;
  min-width: 2.2rem;
}
.mobile-menu a:hover,
.mobile-menu a.active { color: var(--red-soft); transform: translateX(6px); }
.mobile-menu .mm-cta {
  margin-top: 2.6rem;
  display: inline-flex;
  align-self: flex-start;
  padding: 1rem 1.7rem;
  background: var(--red);
  color: var(--cream);
  border-radius: 999px;
  font-family: var(--body);
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 380ms ease, transform 380ms ease, background 200ms ease;
}
.mobile-menu .mm-cta:hover { background: var(--red-deep); }
.mobile-menu .mm-foot {
  margin-top: auto;
  padding-top: 3rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: rgba(244,239,232,0.5);
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.mobile-menu .mm-foot a {
  font-family: var(--body);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: rgba(244,239,232,0.7);
  padding: 0;
  text-transform: uppercase;
}
.mobile-menu .mm-foot a::before { display: none; }
.mobile-menu .mm-foot a:hover { color: var(--red-soft); transform: none; }

/* Open state */
body.nav-open { overflow: hidden; }
body.nav-open .mobile-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
body.nav-open .mobile-menu li {
  opacity: 1;
  transform: translateX(0);
}
body.nav-open .mobile-menu li:nth-child(1) { transition-delay: 80ms; }
body.nav-open .mobile-menu li:nth-child(2) { transition-delay: 140ms; }
body.nav-open .mobile-menu li:nth-child(3) { transition-delay: 200ms; }
body.nav-open .mobile-menu li:nth-child(4) { transition-delay: 260ms; }
body.nav-open .mobile-menu li:nth-child(5) { transition-delay: 320ms; }
body.nav-open .mobile-menu .mm-cta {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 400ms;
}
body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--cream);
}
body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--cream);
}
body.nav-open .nav-brand-text {
  color: var(--cream);
}

@media (max-width: 880px) {
  .nav { padding: 0.9rem 1.25rem; }
  .nav.scrolled { padding: 0.6rem 1.25rem; }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }
}
@media (min-width: 881px) {
  .mobile-menu { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  font-family: var(--body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 0;
  cursor: pointer;
  transition: transform 200ms ease, background 200ms ease, color 200ms ease, box-shadow 200ms ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(200,16,46,0.55);
}
.btn-primary:hover { background: var(--red-deep); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--cream); }
.btn-dark {
  background: var(--ink);
  color: var(--cream);
}
.btn-dark:hover { background: var(--red); }
.btn .arrow { display: inline-block; transition: transform 200ms ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Page header (non-home pages) ---------- */
.page-hero {
  padding: 11rem 0 5rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.page-hero .eyebrow { margin-bottom: 1.5rem; }
.page-hero h1 {
  max-width: 18ch;
  margin-bottom: 1rem;
}
.page-hero p.lead { max-width: 56ch; }
.page-hero::after {
  content: "";
  position: absolute;
  right: -120px; top: -120px;
  width: 380px; height: 380px;
  background: var(--red);
  opacity: 0.06;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
@media (max-width: 720px) {
  .page-hero { padding: 8rem 0 3.5rem; }
  .page-hero::after { width: 240px; height: 240px; right: -80px; top: -80px; }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: var(--cream);
  padding: 5rem 0 2rem;
  position: relative;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand img {
  height: 72px;
  width: auto;
  margin-bottom: 1.2rem;
}
.footer h4 {
  font-family: var(--body);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red-soft);
  margin-bottom: 1.2rem;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.footer a, .footer p { color: rgba(244,239,232,0.7); font-size: 0.92rem; line-height: 1.6; }
.footer a:hover { color: var(--red-soft); }
.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-meta p { font-size: 0.8rem; color: rgba(244,239,232,0.5); }

/* ---------- Top button ---------- */
.top-btn {
  position: fixed;
  right: 1.6rem;
  bottom: 1.6rem;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 30px -8px rgba(200,16,46,0.55), 0 4px 10px rgba(0,0,0,0.1);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 280ms ease, transform 280ms ease, background 200ms ease;
}
.top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.top-btn:hover { background: var(--red-deep); }
.top-btn .arrow-up {
  font-size: 0.85rem;
  line-height: 1;
}

/* ---------- Cards (used across pages) ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 280ms ease, box-shadow 280ms ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 800ms cubic-bezier(.2,.7,.2,1), transform 800ms cubic-bezier(.2,.7,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Form basics ---------- */
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
}
.field input,
.field textarea,
.field select {
  font-family: var(--body);
  font-size: 1rem;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 0;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200,16,46,0.12);
  background: #fff;
}
.field textarea { resize: vertical; min-height: 140px; }
