/* ==========================================================================
   Impromo Group — one-page site
   1. Reset            5. Header / nav
   2. Tokens           6. Sections
   3. Base             7. Reveal animation
   4. Helpers          8. Media queries
   ========================================================================== */

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

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

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

address { font-style: normal; }

/* 2. Tokens --------------------------------------------------------------- */
:root {
  --accent: #1a8fe3;
  --accent-light: #0a7fd3;

  --ink: #16181c;
  --paper: #f5f2eb;
  --paper-alt: #efece3;

  --text: #33363d;
  --text-soft: #3a3d44;
  --text-muted: #4a4d54;
  --text-dim: #5a5d64;
  --text-faint: #7c8088;
  --on-dark: #dcdce0;

  --line: rgba(22, 24, 28, 0.12);
  --line-strong: rgba(22, 24, 28, 0.14);
  --line-light: rgba(245, 242, 235, 0.16);

  --maxw: 1160px;
  --gutter: 32px;
  --section-y: 88px;
  --header-h: 68px;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;
}

/* 3. Base ----------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(36, 59, 107, 0.15);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease;
}
a:hover { color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--accent); color: #fff; }

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
}
.skip-link:focus { left: 0; color: var(--paper); }

/* 4. Helpers -------------------------------------------------------------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section {
  border-top: 1px solid rgba(22, 24, 28, 0.1);
  padding-block: var(--section-y);
  scroll-margin-top: var(--header-h);
}
.section--alt { background: var(--paper-alt); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.eyebrow--light { color: var(--accent-light); }

.section-title {
  font-weight: 600;
  font-size: clamp(30px, 3.8vw, 50px);
  line-height: 1.03;
  max-width: 16ch;
}
.section-title--wide { max-width: 18ch; }

/* 5. Header / nav --------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(22, 24, 28, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(245, 242, 235, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 15px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.14em;
  color: var(--paper);
}
.wordmark:hover { color: var(--paper); }
.wordmark span { color: var(--accent-light); }
.wordmark--footer { color: var(--on-dark); font-size: 15px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
  font-weight: 500;
}
.site-nav a { color: var(--on-dark); }
.site-nav a:hover,
.site-nav a[aria-current='true'] { color: var(--accent-light); }

.mail-pill {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 9px 16px;
  border: 1px solid rgba(245, 242, 235, 0.28);
  border-radius: 999px;
  color: var(--paper);
}
.mail-pill:hover { border-color: var(--accent-light); color: var(--accent-light); }

/* hamburger — hidden above the mobile breakpoint */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  place-items: center;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--paper);
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: '';
  position: absolute;
  left: 0;
}
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }

.nav-open .nav-toggle-bars { background: transparent; }
.nav-open .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

/* 6. Sections ------------------------------------------------------------- */

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: clamp(560px, 78vh, 820px);
  padding-top: 96px;
  padding-bottom: 84px;
  scroll-margin-top: var(--header-h);
}

/* Full-bleed backdrop. The mask dissolves every edge into transparency,
   so the image melts straight into the --paper body colour — no seams. */
.hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: calc(50% - 50vw);
  width: 100vw;
  background: url('../images/hero.jpg') center 58% / cover no-repeat;
  opacity: 0.92;
  -webkit-mask-image: radial-gradient(ellipse 84% 80% at 50% 48%, #000 34%, rgba(0, 0, 0, 0.6) 64%, transparent 88%);
  mask-image: radial-gradient(ellipse 84% 80% at 50% 48%, #000 34%, rgba(0, 0, 0, 0.6) 64%, transparent 88%);
}

/* Paper wash under the copy so the text keeps its contrast over the photo. */
.hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  left: calc(50% - 50vw);
  width: 100vw;
  pointer-events: none;
  background:
    linear-gradient(to bottom, var(--paper) 0%, rgba(245, 242, 235, 0) 22%, rgba(245, 242, 235, 0) 78%, var(--paper) 100%),
    linear-gradient(to right, rgba(245, 242, 235, 0.55) 0%, rgba(245, 242, 235, 0.12) 48%, rgba(245, 242, 235, 0) 72%);
}

.hero h1 {
  font-weight: 700;
  font-size: clamp(44px, 7.2vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  max-width: 15ch;
}
.hero .eyebrow { margin-bottom: 28px; }

.lead {
  margin-top: 34px;
  max-width: 60ch;
  font-size: clamp(18px, 2vw, 22px);
  color: var(--text-soft);
  line-height: 1.5;
}

.tagline {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
}
.tagline span { color: var(--accent); }

.stats {
  margin-top: 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
}
.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  color: var(--accent);
}
.stat-label {
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: start;
}
.about-aside { position: sticky; top: calc(var(--header-h) + 42px); }
.about-aside h2 {
  font-weight: 600;
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.05;
}

/* photo slot — keeps the mockup's stripe pattern until a real file is dropped in */
.ph {
  width: 100%;
  margin-top: 32px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
 
  background-image: repeating-linear-gradient(135deg, rgba(36, 59, 107, 0.06) 0 12px, transparent 12px 24px);
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: 22px;
  font-size: 17px;
  color: var(--text);
  max-width: 64ch;
  line-height: 1.62;
}

/* Services */
.services { margin-top: 56px; }
.service {
  display: grid;
  grid-template-columns: 0.5fr 1.5fr;
  gap: 40px;
  padding-block: 36px;
  border-top: 1px solid var(--line-strong);
}
.service--last { border-bottom: 1px solid var(--line-strong); }
.service-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 10px;
}
.service h3 {
  font-weight: 600;
  font-size: 26px;
  line-height: 1.12;
}
.service p {
  font-size: 17px;
  color: var(--text-soft);
  line-height: 1.6;
  max-width: 62ch;
}

/* Approach */
.principles {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.principle {
  background: var(--paper);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.principle-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}
.principle h3 {
  font-weight: 600;
  font-size: 24px;
  line-height: 1.15;
}
.principle p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Projects */
.projects {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.project {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--paper);
}
.project h3 {
  font-weight: 600;
  font-size: 22px;
  line-height: 1.15;
}
.project p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}
.project-stats {
  display: flex;
  gap: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.project-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
}
.project-value--up { color: var(--accent); }
.project-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 2px;
}

/* Contact */
.contact {
  background: var(--ink);
  color: var(--paper);
}
.contact-title {
  font-weight: 600;
  font-size: clamp(30px, 4.4vw, 58px);
  line-height: 1;
  max-width: 16ch;
}
.contact-grid {
  margin-top: 64px;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  border-top: 1px solid var(--line-light);
}
.contact-col {
  padding: 40px;
  border-right: 1px solid var(--line-light);
}
.contact-col:first-child { padding-left: 0; }
.contact-col--last { padding-right: 0; border-right: 0; }

.contact-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.contact-email {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.6vw, 20px);
  font-weight: 500;
  color: var(--paper);
  line-height: 1.1;
  display: inline-block;
  overflow-wrap: anywhere;
}
.contact-email:hover { color: var(--accent-light); }
.contact-note {
  font-size: 15px;
  color: #9a9ea6;
  margin-top: 14px;
  max-width: 34ch;
}
.contact-address {
  font-size: 19px;
  line-height: 1.5;
  color: var(--on-dark);
}
.socials {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 2px;
}
.socials a {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--on-dark);
}
.socials a:hover { color: var(--accent-light); }

/* Footer */
.site-footer {
  background: var(--ink);
  border-top: 1px solid rgba(245, 242, 235, 0.14);
}
.footer-inner {
  padding-block: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-faint);
}
.footer-copy { font-family: var(--font-mono); }

/* 7. Reveal animation ----------------------------------------------------- */
/* Only applied when JS is running, so no-JS visitors and crawlers see everything. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* 8. Media queries -------------------------------------------------------- */
@media (max-width: 860px) {
  .nav-toggle { display: grid; }

  /* Portrait viewports crop the 16:9 photo hard, so soften it and pull the
     horizon up under the copy instead of leaving a sharp band at the bottom. */
  .hero {
    min-height: clamp(520px, 74vh, 700px);
  }
  .hero::before {
    background-position: 56% 64%;
    opacity: 0.78;
    -webkit-mask-image: radial-gradient(ellipse 130% 74% at 50% 58%, #000 18%, rgba(0, 0, 0, 0.5) 52%, transparent 84%);
    mask-image: radial-gradient(ellipse 130% 74% at 50% 58%, #000 18%, rgba(0, 0, 0, 0.5) 52%, transparent 84%);
  }
  .hero::after {
    background:
      linear-gradient(to bottom, var(--paper) 0%, rgba(245, 242, 235, 0) 26%, rgba(245, 242, 235, 0) 74%, var(--paper) 100%),
      linear-gradient(to right, rgba(245, 242, 235, 0.6) 0%, rgba(245, 242, 235, 0.3) 60%, rgba(245, 242, 235, 0.15) 100%);
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 32px 24px;
    background: var(--ink);
    border-bottom: 1px solid rgba(245, 242, 235, 0.12);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    font-size: 17px;
    display: none;
  }
  .nav-open .site-nav { display: flex; }
  .site-nav a {
    width: 100%;
    padding-block: 13px;
    border-bottom: 1px solid rgba(245, 242, 235, 0.1);
  }
  .site-nav .mail-pill {
    width: auto;
    margin-top: 20px;
    padding: 11px 18px;
    font-size: 14px;
    border: 1px solid rgba(245, 242, 235, 0.28);
  }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-aside { position: static; }
  .ph { max-width: 520px; }

  .service { grid-template-columns: 1fr; gap: 16px; }
  .principles { grid-template-columns: 1fr; }
  .projects { grid-template-columns: 1fr; }

  .contact-grid { grid-template-columns: 1fr; }
  .contact-col {
    padding: 32px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line-light);
  }
  .contact-col--last { border-bottom: 0; padding-bottom: 0; }
}

@media (max-width: 600px) {
  :root {
    --gutter: 20px;
    --section-y: 56px;
  }
  .site-nav { padding-inline: 20px; }
  .hero { padding-top: 60px; padding-bottom: 56px; }
  .stats { gap: 28px 40px; }
  .principle { padding: 32px 24px; }
  .project { padding: 28px 22px; }
  .contact-grid { margin-top: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  .site-header, .skip-link, .nav-toggle { display: none; }
  body { background: #fff; color: #000; }
  .contact, .site-footer { background: #fff; color: #000; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
