/* ============================================================
   CADDZY DESIGN STUDIO — BASE / DESIGN SYSTEM
   Visual language modelled on conceptsdesignstudio.in,
   rendered in the client palette: RED / BLACK / WHITE.
   Edit global tokens here (colors, type scale, spacing).
   Each section has its own CSS file in /css.
   ============================================================ */

:root {
  /* ---- Core palette: red / black / white ---- */
  --red: #e11d2a;             /* primary accent — headings, buttons, links */
  --red-dark: #b4151f;        /* hover / pressed */
  --red-soft: rgba(225, 29, 42, 0.08);
  --red-line: rgba(225, 29, 42, 0.26);

  --black: #000000;           /* footer */
  --ink: #111111;             /* dark sections (services, quote, bands) */
  --ink-2: #1a1a1a;           /* dark cards on dark sections */

  --white: #ffffff;
  --off-white: #f6f5f3;       /* alternating light surface */
  --light-gray: #efedea;

  /* Legacy aliases kept so older rules keep resolving */
  --navy: var(--ink);
  --charcoal: var(--ink);
  --slate: #55534f;
  --sky: var(--red);
  --sky-soft: var(--red-soft);

  /* ---- Text ---- */
  --text-strong: #121212;
  --text-body: #55534f;
  --text-muted: #7b7873;
  --text-on-dark: rgba(255, 255, 255, 0.82);
  --text-on-dark-strong: #ffffff;

  /* ---- Lines / borders ---- */
  --line: #e5e2de;
  --line-strong: #d6d2cc;
  --line-on-dark: rgba(255, 255, 255, 0.16);

  /* ---- Type scale ---- */
  --fs-display: clamp(2.4rem, 5.6vw, 4.25rem); /* hero */
  --fs-hero: var(--fs-display);
  --fs-section: clamp(2rem, 4.2vw, 3.25rem);   /* section titles — big, like the reference */
  --fs-sub: 1.375rem;
  --fs-body: 1rem;      /* reference body copy is small (15px) */
  --fs-small: 0.9375rem;
  --fs-tiny: 0.8125rem;

  /* ---- Spacing system ---- */
  --space-xs: 24px;
  --space-sm: 48px;
  --space-md: 80px;
  --space-lg: 120px;

  /* ---- Layout ---- */
  --max-width: 1240px;  /* reference runs a tighter column than before */
  --gutter: clamp(20px, 5vw, 40px);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 100px;

  /* ---- Motion ---- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.6s;

  /* ---- Elevation ---- */
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.06);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 36px 80px rgba(0, 0, 0, 0.2);

  --nav-h: 84px;
}

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

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

body {
  font-family: "AR One Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--text-body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; padding: 0; }

/* ---- Headings ---- */
h1, h2, h3, h4 {
  color: var(--text-strong);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

/* ---- Layout helpers ---- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(68px, 9vw, 110px);
}
/* Offset in-page anchors so the fixed navbar never covers headings */
section[id], [id].footer { scroll-margin-top: 84px; }
#hero { scroll-margin-top: 0; }
.section--tight { padding-block: clamp(48px, 7vw, 76px); }
.bg-offwhite { background: var(--off-white); }
.bg-light { background: var(--light-gray); }
.bg-navy, .bg-ink { background: var(--ink); color: var(--text-on-dark); }

/* Dark sections: fine vertical pinstripe, as on the reference services band */
.bg-ink, .bg-navy {
  background-image:
    repeating-linear-gradient(90deg,
      rgba(255, 255, 255, 0.022) 0 1px,
      transparent 1px 7px);
}

/* ---- Eyebrow label ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: var(--fs-tiny);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--red);
}
.eyebrow--center { justify-content: center; }
.is-center .eyebrow { justify-content: center; }
.eyebrow--on-dark { color: #fff; }
.eyebrow--on-dark::before { background: var(--red); }

/* ---- Section heading block ---- */
.section-head { max-width: 760px; }
.section-head.is-center { margin-inline: auto; text-align: center; }
.section-title {
  font-size: var(--fs-section);
  font-weight: 700;
  margin-top: 14px;
}
/* Two-tone headings — the signature move of the reference design.
   Mark the second half with <span class="accent"> to pick up the red. */
.section-title .accent,
.hero__title .accent { color: var(--red); }
.on-dark .section-title,
.bg-navy .section-title,
.bg-ink .section-title { color: #fff; }

.section-intro {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: var(--fs-body);
  line-height: 1.8;
}
.is-center .section-intro { margin-inline: auto; max-width: 740px; }
.bg-navy .section-intro,
.bg-ink .section-intro,
.on-dark .section-intro { color: var(--text-on-dark); }

/* ---- Type utilities ---- */
.text-accent { color: var(--red); }
.text-slate { color: var(--slate); }
.lead { font-size: 1.0625rem; line-height: 1.8; color: var(--text-body); }

/* ============================================================
   MOTION UTILITIES (paired with AOS + custom JS)
   ============================================================ */

/* Animated underline (nav + text links) */
.link-underline {
  position: relative;
  display: inline-block;
}
.link-underline::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.link-underline:hover::after { transform: scaleX(1); transform-origin: left; }

/* Floating element */
.floaty { animation: floaty 6s ease-in-out infinite; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Loading state before section partials are injected */
[data-include] { min-height: 1px; }

/* Skip link (accessibility) */
.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 12px 12px;
  font-weight: 600;
  transition: top 0.3s var(--ease);
}
.skip-link:focus-visible { top: 0; outline: 3px solid var(--red); }

/* Visually hidden (labels kept for screen readers on placeholder-only forms) */
.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;
}
