/* ═══════════════════════════════════════════════════════════
   Conquest Digital — main.css
   Single-page site. Hand-written, no frameworks.

   TABLE OF CONTENTS
   1. Design Tokens
   2. Font Faces
   3. Reset & Base
   4. Accessibility
   5. Typography
   6. Shared Components (buttons, wrap-line, social links)
   7. Hero
   8. Content Panel & Sections
   9. Project Highlights
  10. Contact Form
  11. Footer
  12. Scroll Reveal
  13. Desktop Layout  (≥992px wide, ≥800px tall)
  14. Keyframes
   ═══════════════════════════════════════════════════════════ */

/* 1. Design Tokens
   ──────────────────────────────────────────────────────── */

:root {
  --c-dark: #333;
  --c-black: #000;
  --c-white: #fff;
  --c-light: #767676;
  --c-grey: #444;
  --c-panel: #fff;
  --c-error: #c0392b;
  --c-success: #2e7d32;
  --f-head: 'Montserrat', Helvetica, Arial, sans-serif;
  --f-body: 'Source Sans Pro', Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.77, 0, 0.175, 1);
}

/* 2. Font Faces
   Montserrat: 200 (ExtraLight), 400 (Medium), 700 (Bold)
   Source Sans Pro: 300 (Light), 400 (Regular), 700 (Bold)
   All woff2, self-hosted. Zero external requests.
   ──────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/montserrat/Montserrat-ExtraLight.woff2') format('woff2');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/montserrat/Montserrat-Medium.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/montserrat/Montserrat-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans Pro';
  src: url('/fonts/source-sans-pro/SourceSansPro-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans Pro';
  src: url('/fonts/source-sans-pro/SourceSansPro-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans Pro';
  src: url('/fonts/source-sans-pro/SourceSansPro-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* 3. Reset & Base
   ──────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--f-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5;
  color: var(--c-dark);
  background: var(--c-black);
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
p {
  margin-bottom: 1em;
}
img {
  max-width: 100%;
  display: block;
}

/* 4. Accessibility
   ──────────────────────────────────────────────────────── */

.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;
}

.skip-to-content {
  position: absolute;
  top: -100%;
  left: 0;
  padding: 8px 16px;
  background: var(--c-white);
  color: var(--c-dark);
  font-family: var(--f-head);
  font-size: 14px;
  z-index: 200;
  transition: top 0.2s;
}
.skip-to-content:focus {
  top: 0;
}

/* JS toggles this on resize to prevent layout animation during drag */
.no-transitions,
.no-transitions *,
.no-transitions *::before,
.no-transitions *::after {
  transition: none !important;
}

/* 5. Typography
   All headings: Montserrat 400 (Medium), uppercase.
   Body: Source Sans Pro 300 (Light).
   ──────────────────────────────────────────────────────── */

h1,
h2,
h3,
h4 {
  font-family: var(--f-head);
  font-weight: 400;
  line-height: 1.2;
}
h1 {
  font-size: 28px;
  text-transform: uppercase;
  letter-spacing: 4.2px;
  line-height: 42px;
  margin-bottom: 30px;
}
h2 {
  font-size: 28px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
h3 {
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.font-weight-200 {
  font-weight: 200;
}

/* Centered underline beneath section headings */
.wrap-line {
  position: relative;
  margin-bottom: 50px;
  padding-bottom: 30px;
}
.wrap-line::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  border-bottom: 1px solid currentColor;
}

/* 6. Shared Components
   ──────────────────────────────────────────────────────── */

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  font-family: var(--f-head);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border: none;
  transition:
    background 0.3s,
    color 0.3s,
    border-color 0.3s;
  cursor: pointer;
  margin: 15px 0;
}
.btn-dark {
  background: var(--c-dark);
  color: var(--c-white);
}
.btn-dark:hover {
  background: var(--c-black);
}
.btn-border-white {
  background: transparent;
  color: var(--c-white);
  border: 1px solid var(--c-white);
}
.btn-border-white:hover {
  background: var(--c-white);
  color: var(--c-dark);
}

/* Social links — reused in hero, solutions, contact, footer */
.social-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
}
.social-links a {
  display: inline-flex;
  align-items: center;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.social-links a:hover {
  opacity: 1;
}
.social-links svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* 7. Hero
   Mobile: full-viewport, stacked above content.
   Desktop: fixed left panel (see §13).
   ──────────────────────────────────────────────────────── */

.navbar {
  display: none;
}

#hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--c-white);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: url('/images/bg-hero-1200w.webp') no-repeat center center;
  background-size: cover;
  z-index: 0;
  animation: bgEnter 1.5s ease-out both;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0.6;
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 60px 30px;
  max-width: 560px;
}
.hero-logo {
  display: flex;
  justify-content: center;
  margin: 0 auto 30px;
}
.hero-content h1 {
  color: var(--c-white);
  margin-bottom: 20px;
}
.hero-sub {
  color: var(--c-white);
  opacity: 0.85;
  margin-bottom: 30px;
}
.hero-arrow {
  margin: 20px auto;
}
.hero-arrow svg {
  width: 24px;
  height: 24px;
  fill: var(--c-white);
}
.hero-social {
  margin-top: 30px;
}

/* 8. Content Panel & Sections
   Mobile: normal flow below hero.
   Desktop: fixed right panel, slides in on toggle (see §13).
   ──────────────────────────────────────────────────────── */

.content-panel {
  background: var(--c-panel);
}
main {
  text-align: center;
}

.section-inner {
  padding: 60px 40px;
  max-width: 600px;
  margin: 0 auto;
}
.section-arrow {
  margin: 30px auto;
  text-align: center;
}
.section-arrow svg {
  width: 24px;
  height: 24px;
  fill: var(--c-dark);
}
.section-social {
  margin-top: 30px;
}
.section-social .social-links a {
  color: var(--c-dark);
}

/* 9. Project Highlights
   ──────────────────────────────────────────────────────── */

.highlight-card {
  padding: 30px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  text-align: left;
}
.highlight-card:last-of-type {
  border-bottom: none;
}
.highlight-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}
.highlight-meta {
  font-size: 13px;
  color: var(--c-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.highlight-result {
  margin-bottom: 8px;
}
.highlight-card > :last-child {
  margin-bottom: 0;
}
.highlight-link {
  font-family: var(--f-head);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: underline;
}

/* 10. Contact Form
   ──────────────────────────────────────────────────────── */

.contact-form {
  position: relative;
  margin-bottom: 40px;
}

#form-status {
  margin-top: 16px;
  font-family: var(--f-head);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  min-height: 20px;
  transition: color 0.3s;
}

.form-group {
  margin: 0 auto 20px;
  width: 90%;
  transition: width 0.3s;
}
.form-group:focus-within {
  width: 100%;
}

.form-group input,
.form-group textarea {
  width: 100%;
  height: 50px;
  border: none;
  border-bottom: 1px solid var(--c-dark);
  background: transparent;
  font-family: var(--f-head);
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-dark);
  padding: 0 8px;
  outline: none;
  transition: border-color 0.3s;
  -webkit-appearance: none;
  appearance: none;
}
.form-group textarea {
  height: auto;
  min-height: 50px;
  padding-top: 14px;
  resize: none;
  overflow: hidden;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--c-light);
}

.form-group.error input,
.form-group.error textarea {
  border-bottom-color: var(--c-error);
  color: var(--c-error);
}
.form-group.error input::placeholder,
.form-group.error textarea::placeholder {
  color: var(--c-error);
}

.contact-info {
  margin: 40px 0;
}
.contact-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}
.contact-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: var(--c-dark);
}

.honeypot {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

/* 11. Footer
   ──────────────────────────────────────────────────────── */

footer {
  padding: 30px 20px;
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}
.footer-copy {
  font-family: var(--f-head);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-grey);
  margin-bottom: 16px;
}

/* 12. Scroll Reveal
   .js class on <html> set by head inline script.
   Elements hidden until IntersectionObserver adds .visible.
   Without JS, content is visible by default.
   ──────────────────────────────────────────────────────── */

.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s,
    transform 0.6s;
}
.js .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 13. Desktop Layout
   Requires both ≥992px width and ≥800px height.
   Short viewports (laptop + DevTools, landscape tablets)
   fall through to the mobile stacked layout.
   ═══════════════════════════════════════════════════════════ */

@media (min-width: 992px) and (min-height: 800px) {
  body {
    overflow: hidden;
  }

  /* ── Navbar ──
     Width tracks the hero column so links always sit over
     the dark background, not the white content panel. */
  .navbar {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: 100;
    padding: 20px 30px;
    justify-content: flex-end;
    align-items: center;
    pointer-events: none;
    transition: width 0.6s var(--ease);
  }
  body.show-content .navbar {
    width: 50vw;
  }

  /* ── Hamburger → X ── */
  .navbar-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: auto;
  }
  .navbar-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--c-white);
    transition:
      transform 0.3s,
      opacity 0.3s;
    transform-origin: center;
  }
  .navbar-open .navbar-toggle span:nth-child(1) {
    transform: translateY(8px) rotate(135deg);
  }
  .navbar-open .navbar-toggle span:nth-child(2) {
    opacity: 0;
  }
  .navbar-open .navbar-toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-135deg);
  }

  /* ── Nav links ──
     Slide from right with reversed stagger: nearest-to-hamburger first.
     On close, no delay — all snap out together. */
  .navbar-nav {
    list-style: none;
    display: flex;
    gap: 30px;
    margin-right: 20px;
    pointer-events: none;
  }
  .navbar-nav li {
    opacity: 0;
    transform: translateX(100%);
    visibility: hidden;
    transition:
      transform 0.3s ease-in-out,
      opacity 0.3s ease-in-out,
      visibility 0.3s;
  }
  .navbar-nav a {
    font-family: var(--f-head);
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--c-white);
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
    transition: border-color 0.2s;
  }
  .navbar-nav a:hover,
  .navbar-nav a.active {
    border-bottom-color: var(--c-white);
  }

  body.show-content .navbar-nav {
    pointer-events: auto;
  }
  body.show-content .navbar-nav li {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }
  body.show-content .navbar-nav li:nth-child(1) {
    transition-delay: 1.2s;
  }
  body.show-content .navbar-nav li:nth-child(2) {
    transition-delay: 0.9s;
  }
  body.show-content .navbar-nav li:nth-child(3) {
    transition-delay: 0.6s;
  }

  /* ── Hero: fixed left, narrows to 50vw on toggle ── */
  #hero {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    min-height: 0;
    transition: width 0.6s var(--ease);
  }
  .hero-bg {
    background-image: url('/images/bg-hero-1800w.webp');
  }
  body.show-content #hero {
    width: 50vw;
  }

  /* ── Content panel: fixed right, hidden until toggle ──
     visibility:hidden prevents flash on breakpoint crossing. */
  .content-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 50vw;
    height: 100vh;
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    transition:
      transform 0.6s var(--ease),
      visibility 0.6s;
  }
  body.show-content .content-panel {
    transform: translateX(0);
    visibility: visible;
    overflow-y: scroll;
  }
}

/* 14. Keyframes
   ═══════════════════════════════════════════════════════════ */

@keyframes bgEnter {
  from {
    transform: scale(1.1);
  }
  to {
    transform: scale(1);
  }
}
