/* ===========================================================================
   Varmine — Architect's drafting theme
   Layers a blueprint / sketchbook aesthetic on top of the base design:
   graph-paper ground, pencil-stroke underlines, drafting section numbers,
   monospace technical labels, and sketchy frames.
   Loaded LAST so it wins the cascade.
=========================================================================== */

:root {
  --mono: "Spline Sans Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ink: #1c1a17;
  --paper: #f5f2ea;
  --paper-2: #efeadd;
  --blueprint: #274060;
  --graphite: #4a4640;
  --line-soft: rgba(28, 26, 23, 0.12);
  --line-med: rgba(28, 26, 23, 0.22);
}

/* --- Graph-paper ground ---------------------------------------------------- */
body {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--ink);
}

/* Surface sections get a slightly deeper paper with a heavier grid */
.section--surface {
  background-color: var(--paper-2);
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* --- Navigation: drafting title block ------------------------------------- */
.site-header {
  background-color: rgba(245, 242, 234, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--ink);
}
.nav__logo { display: inline-flex; align-items: center; }
.nav__logo-text {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.nav__link {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}
/* hand-drawn underline on hover */
.nav__link::after {
  height: 2px;
  background: var(--blueprint);
  border-radius: 2px;
}

/* --- Drafting section numbers + sketch underline -------------------------- */
.section { position: relative; }
.section__head { position: relative; padding-top: var(--space-5); }
.section__head::before {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--blueprint);
  display: block;
  margin-bottom: var(--space-3);
}
#portfolio .section__head::before { content: "01 — SELECTED WORK"; }
#services  .section__head::before { content: "02 — SERVICES"; }
#about     .section__head::before { content: "03 — STUDIO"; }
#team      .section__head::before { content: "04 — PEOPLE"; }
#contact   .section__head::before { content: "05 — CONTACT"; }

/* Sketchy hand-drawn underline under every section title */
.section__title { position: relative; display: inline-block; padding-bottom: 0.35em; }
.section__title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 8px;
  background: none;
  /* wavy pencil stroke via layered SVG-like gradient */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='8' viewBox='0 0 200 8'%3E%3Cpath d='M1 5 C 30 1, 50 7, 80 4 S 140 1, 199 5' fill='none' stroke='%23274060' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 200px 8px;
}

/* --- Cards: technical drawing frames -------------------------------------- */
.card--project,
.card--service,
.card--team {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 0;
}
.card--service,
.card--team { padding: var(--space-5); }

/* corner registration ticks on project cards */
.card--project::before,
.card--project::after {
  content: "";
  position: absolute;
  width: 12px; height: 12px;
  border: 1.5px solid var(--blueprint);
  z-index: 2;
}
.card--project::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.card--project::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.card__media { border-bottom: 1px solid var(--ink); border-radius: 0; }
.card__media img { filter: grayscale(0.15) contrast(1.02); }
.card--project .card__title,
.card--project .card__meta { padding-inline: var(--space-4); }
.card--project .card__title { padding-top: var(--space-3); }
.card--project .card__meta {
  padding-bottom: var(--space-4);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blueprint);
}
.card__title { font-family: var(--font-display); }

/* hover: blueprint tint sweep */
.card--project .card__link:hover .card__media img { transform: scale(1.04); filter: grayscale(0) contrast(1.05); }

/* service card index numbers */
.services-list { counter-reset: svc; }
.card--service { counter-increment: svc; }
.card--service .card__title::before {
  content: counter(svc, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--blueprint);
  display: block;
  margin-bottom: var(--space-2);
  letter-spacing: 0.1em;
}
.card--service .card__body { font-size: 0.95rem; }

/* team cards: portrait framed square */
.card--team { text-align: center; }
.card--team .card__media { aspect-ratio: 1/1; border: 1px solid var(--ink); margin-bottom: var(--space-4); }
.card--team .card__media img { filter: grayscale(1) contrast(1.05); transition: filter 0.4s var(--ease-reveal); }
.card--team:hover .card__media img { filter: grayscale(0); }
.card--team .card__meta {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--blueprint);
}

/* --- Hero: white architectural sketch, dark ink text ---------------------- */
/* Gentle left-to-right paper wash so the sketch stays visible on the right */
.hero__bg::after {
  background: linear-gradient(
    105deg,
    rgba(245,242,234,0.96) 0%,
    rgba(245,242,234,0.86) 34%,
    rgba(245,242,234,0.30) 72%,
    rgba(245,242,234,0) 100%
  );
}

/* Text sits in a clean column, left-aligned like a title block */
.hero__content {
  max-width: 40rem;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
}

/* Drafting eyebrow label */
.hero__content::before {
  content: "ARCHITECTURE, INTERIOR, DESIGN - JAIPUR";
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  color: var(--blueprint);
  margin-bottom: var(--space-5);
  padding: 0.4em 0.9em;
  border: 1px solid var(--blueprint);
}

.hero__name {
  position: relative;
  margin: 0;
}
.hero__logo-img {
  display: block;
  width: clamp(280px, 60vw, 720px);
  height: auto;
  object-fit: contain;
}

.hero .hero__tagline {
  margin-top: var(--space-6);
  max-width: 34ch;
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.5;
  color: var(--graphite);
}

/* CTA: ink outline, drafting label */
.hero .btn--primary {
  margin-top: var(--space-7);
  background: var(--ink);
  color: var(--paper);
  border: 1.5px solid var(--ink);
  padding: 0.9em 2em;
}
.hero .btn--primary:hover { background: transparent; color: var(--ink); }

/* --- Buttons: drafted outline --------------------------------------------- */
.btn--primary {
  background: transparent;
  color: var(--paper);
  border: 1.5px solid var(--paper);
  border-radius: 0;
  font-family: var(--mono);
  letter-spacing: 0.14em;
  position: relative;
  transition: color 0.3s var(--ease-reveal), background-color 0.3s var(--ease-reveal);
}
.btn--primary:hover { background: var(--paper); color: var(--ink); }

/* --- Contact: technical spec list ----------------------------------------- */
.contact__details {
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 2;
  border-left: 2px solid var(--blueprint);
  padding-left: var(--space-5);
}
.contact__line a { color: var(--ink); border-bottom: 1px solid var(--blueprint); }

/* --- Footer: title block -------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  border-top: 3px double var(--paper);
}
.site-footer__grid { position: relative; }
.site-footer__brand { font-family: var(--font-display); }
.site-footer__logo-img {
  display: block;
  width: clamp(160px, 22vw, 240px);
  height: auto;
  object-fit: contain;
}
.site-footer__location,
.site-footer__copyright { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; }

/* --- Progress bar: drafting ruler ----------------------------------------- */
.progress { height: 3px; background: var(--line-soft); }
.progress-fill { background: var(--blueprint); }

/* --- About: framed plan --------------------------------------------------- */
.about__media { border: 1px solid var(--ink); }
.about__media img { filter: grayscale(0.2) contrast(1.02); }
.about__content p { color: var(--graphite); }

/* --- Dimension line decoration between sections --------------------------- */
.section + .section::before {
  content: "";
  position: absolute;
  top: 0; left: var(--gutter); right: var(--gutter);
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--line-med) 0 8px, transparent 8px 16px);
}

/* --- Reduced-motion / no-JS: ensure content visible ----------------------- */
.section__title, .card { opacity: 1; }

/* Custom cursor removed — native OS cursor is used. */
.cursor { display: none !important; }

/* --- Hero bg oversize so parallax translate never reveals edges ----------- */
.hero__bg { overflow: hidden; }
/* Sketch fills the hero, ground anchored to the bottom edge, full width. */
.hero__bg { position: absolute; inset: 0; overflow: hidden; }
.hero__bg-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

/* --- Reveal overrides ------------------------------------------------------ */
/* Text/generic blocks: safe opacity + rise (always ends visible). */
.motion-ready .reveal,
.motion-ready .reveal-text {
  clip-path: none !important;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-reveal), transform 0.7s var(--ease-reveal);
  will-change: opacity, transform;
}
.motion-ready .reveal.is-revealed,
.motion-ready .reveal-text.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Images: distinct masked wipe. The wrapper clips; the img scales down to 1.
   Final state is fully open + full opacity, so it can never stay hidden. */
.motion-ready .reveal-image {
  clip-path: inset(0 0 100% 0);
  opacity: 1;
  transition: clip-path 0.9s var(--ease-reveal);
  will-change: clip-path;
}
.motion-ready .reveal-image img {
  transform: scale(1.12);
  transition: transform 1.1s var(--ease-reveal);
  will-change: transform;
}
.motion-ready .reveal-image.is-revealed {
  clip-path: inset(0 0 0 0);
}
.motion-ready .reveal-image.is-revealed img {
  transform: scale(1);
}
/* Fallback images (load error) skip the mask and show immediately. */
.reveal-image.is-fallback { clip-path: none !important; }
.reveal-image.is-fallback img { transform: none !important; }

/* If JS is unavailable (no .motion-ready), everything is fully visible. */
