/* ==========================================================================
   ACTP LTD | Architectural Design-Build Studio (Est. 2003)
   UI/UX PRO MAX - Architectural Drafting & Axonometric Studio Aesthetic
   Inspired by Hand-Drawn Technical Axonometrics, Blueprint Vellum & Precision Craft
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800&family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Mono:ital,wght@0,400;0,700;1,400&family=JetBrains+Mono:wght@300;400;500;600;700&display=swap');

:root {
  /* ==========================================================================
     LIGHT THEME (PRIMARY DEFAULT: Drafting Vellum & Technical Pen on Linen)
     ========================================================================== */
  --bg-primary: #ffffff;
  --bg-secondary: #f7f7f7;
  --bg-tertiary: #f0f0f0;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.94);
  --bg-glass-card: rgba(255, 255, 255, 0.9);
  --bg-vellum: #ffffff;
  
  --text-primary: #171717;
  --text-secondary: #515151;
  --text-muted: #787878;
  --text-inverse: #fafafa;
  
  /* Brand Signature: ACTP Precision Drafting Ink (Black & White UI, Orange reserved for logo mark only) */
  --brand-orange: #171717;
  --brand-orange-light: #3f3f3f;
  --brand-orange-dark: #000000;
  --brand-orange-glow: rgba(23, 23, 23, 0.16);
  --brand-orange-subtle: rgba(23, 23, 23, 0.06);
  --brand-contrast: #ffffff;

  /* The single sanctioned colour in the UI. If an element is coloured, it is this. */
  --brand-accent: #f26522;
  --brand-accent-soft: rgba(242, 101, 34, 0.12);

  --accent-ink: #171717;

  /* Architectural Drafting Borders & Lineweights (0.25mm / 0.5mm / 1.0mm) */
  --border-hairline: rgba(23, 23, 23, 0.08);
  --border-subtle: rgba(23, 23, 23, 0.14);
  --border-medium: rgba(23, 23, 23, 0.28);
  --border-bold: rgba(23, 23, 23, 0.85);
  --border-brand: rgba(23, 23, 23, 0.55);
  --border-dashed: dashed 1px rgba(23, 23, 23, 0.22);

  /* Elevation Shadows (Crisp Architectural Precision) */
  --shadow-sm: 0 1px 3px rgba(23, 23, 23, 0.04), 0 1px 2px rgba(23, 23, 23, 0.02);
  --shadow-md: 0 8px 24px rgba(23, 23, 23, 0.06), 0 2px 6px rgba(23, 23, 23, 0.03);
  --shadow-lg: 0 20px 48px rgba(23, 23, 23, 0.08), 0 4px 12px rgba(23, 23, 23, 0.04);
  --shadow-plate: 0 0 0 1px var(--border-medium), 0 12px 32px rgba(23, 23, 23, 0.06);
  --shadow-brand: 0 12px 28px rgba(23, 23, 23, 0.22);
  
  /* Typography */
  --font-display: 'Cinzel', serif;
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Space Mono', monospace;
  
  /* Layout Dimensions */
  --max-width: 1420px;
  --header-height: 84px;
  --header-height-scrolled: 72px;
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  
  /* Motion & Spring Physics */
  --transition-fast: 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   DARK BLUEPRINT MODE (Optional Toggle: Cyan-Graphite Blueprint)
   ========================================================================== */

/* ==========================================================================
   Base Reset & Document Setup
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  position: relative;
}

/* Top Reading Scroll Progress Bar */
#scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--brand-accent);
  z-index: 9999;
  transition: width 0.08s ease-out;
}

/* ==========================================================================
   Architectural Drafting Grid Backdrop (Isometric & Orthogonal Ticks)
   ========================================================================== */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    linear-gradient(to right, var(--border-hairline) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-hairline) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
}

/* Axonometric drafting plate — the studio's own drawing, used as the sheet itself */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('../assets/architectural-axonometric.webp');
  background-size: cover;
  background-position: center 22%;
  background-repeat: no-repeat;
  filter: grayscale(1) contrast(1.25);
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 0;
  opacity: 0.09;
  -webkit-mask-image: radial-gradient(ellipse 120% 85% at 50% 38%, #000 35%, transparent 78%);
  mask-image: radial-gradient(ellipse 120% 85% at 50% 38%, #000 35%, transparent 78%);
}

/* On the blueprint theme the plate reads as white line on graphite */

@media (max-width: 768px) {
  body::after {
    opacity: 0.06;
  }
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.6rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2.1rem, 3.8vw, 3.1rem);
  font-weight: 800;
}

h3 {
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  font-weight: 700;
}

h4 {
  font-size: 1.25rem;
  font-weight: 700;
}

p {
  color: var(--text-secondary);
  font-size: 1.02rem;
  font-weight: 400;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Containers & Section Structure */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.section {
  padding: 6.5rem 0;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 4rem auto;
}

/* Architectural Drawing Plate Tag */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xs);
  color: var(--brand-orange-dark);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.section-tag::before {
  content: '◬';
  font-size: 0.85rem;
  color: var(--brand-accent);
}

.section-title {
  margin-bottom: 1.25rem;
}

.section-description {
  font-size: 1.12rem;
  color: var(--text-secondary);
  max-width: 780px;
  margin: 0 auto;
  line-height: 1.68;
}

.highlight {
  color: var(--brand-accent);
  position: relative;
  display: inline-block;
}

/* Precision Button System (Architectural Drafting Aesthetic) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.85rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 1px solid transparent;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--brand-orange);
  color: #ffffff;
  border-color: var(--brand-orange-dark);
  box-shadow: 0 2px 8px var(--brand-orange-glow);
}

.btn-primary:hover {
  background: var(--brand-orange-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-brand);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-bold);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--brand-orange);
  color: var(--brand-orange);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1.15rem;
  font-size: 0.78rem;
}

/* Floating Back to Top Button */
.back-to-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--transition-normal);
  z-index: 95;
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top-btn:hover {
  background: var(--brand-orange);
  color: #ffffff;
  border-color: var(--brand-orange);
}

/* Scroll Animation Helper */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease-out, transform 0.55s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
