/* ===========================================================
   Digital World Programs LLC — dwprograms.com
   Palette taken from the DWP logo: navy ink + binary cyan.
   The page is a full-screen looping intro over navy, then contact.
   =========================================================== */

:root {
  --navy:       #16202B;   /* the brand navy — now the whole page */
  --navy-lift:  #1E2E3D;   /* the lighter end of the contact gradient */
  --navy-deep:  #10181F;   /* footer */

  --text:       #E9EEF2;
  --text-soft:  #A9BAC7;
  --text-mute:  #8E9FAC;
  --line:       rgba(255, 255, 255, .16);

  --cyan:       #2E9BC7;
  --cyan-dark:  #1E7FA9;
  --cyan-light: #9BDCF2;

  --radius:     14px;
  --radius-lg:  22px;
  --wrap:       1140px;
  --header-h:   clamp(72px, 7.5vw, 100px);

  --font-head:  'Poppins', 'Segoe UI', Arial, sans-serif;
  --font-body:  'Inter', 'Segoe UI', Arial, sans-serif;

  /* One full turn of the intro: the line, the wordmark, then the work links —
     each fades in, holds ~3s and fades out. Change this one number to slow the
     whole loop down or speed it up; the three slides divide it between them. */
  --loop:       13.8s;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-weight: 700; letter-spacing: -.015em; }
h3 { font-size: 1.18rem; font-weight: 600; }
p  { margin: 0 0 1rem; }
a  { color: var(--cyan-light); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: #fff; color: var(--navy); padding: 12px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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

.eyebrow {
  font-family: var(--font-head);
  font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--cyan); margin: 0 0 .8rem;
}
.eyebrow.light { color: var(--cyan-light); }

/* Used by 404.html. */
.lede { font-size: clamp(1.05rem, 1.7vw, 1.28rem); color: var(--text-soft); max-width: 62ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 600; font-size: .98rem;
  padding: 14px 28px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .16s ease, box-shadow .16s ease,
                              background-color .16s ease, color .16s ease,
                              border-color .16s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--cyan-dark) 100%);
  color: #fff; box-shadow: 0 6px 20px rgba(46, 155, 199, .32);
}
.btn-primary:hover { box-shadow: 0 10px 28px rgba(46, 155, 199, .42); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--cyan-light); color: #fff; }
.btn-sm { padding: 10px 20px; font-size: .9rem; }

/* ---------- Header ----------
   Nothing should sit on top of the intro, so the header only fades in once you
   have scrolled past it. Gated behind .js: with JS off it stays visible. */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(22, 32, 43, .82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: opacity .35s ease, border-color .2s ease;
}
.js .site-header { opacity: 0; visibility: hidden; }
.js .site-header.scrolled { opacity: 1; visibility: visible; border-bottom-color: var(--line); }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--header-h); }

/* Same type lockup as the intro, set small. */
.brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-initials {
  font-family: var(--font-head); font-weight: 800;
  font-size: 1.45rem; line-height: 1; letter-spacing: -.035em; color: #fff;
}
.brand-name {
  font-family: var(--font-head); font-weight: 500;
  font-size: .66rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--cyan-light); white-space: nowrap;
}

/* ---------- Intro loop ---------- */
.intro {
  position: relative; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  margin-top: calc(var(--header-h) * -1);   /* sits under the sticky header */
  display: grid; place-items: center;
  padding: calc(var(--header-h) + 24px) 24px 120px;
}

.intro-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(1100px 620px at 50% 32%, rgba(46, 155, 199, .16) 0%, transparent 68%),
    linear-gradient(170deg, var(--navy) 0%, var(--navy-lift) 100%);
}

.intro-stage {
  position: relative; z-index: 1;
  display: grid; justify-items: center; align-items: center; gap: 34px;
  width: 100%; max-width: 980px; min-height: clamp(200px, 34vh, 320px);
}

.intro-line {
  margin: 0; text-align: center; max-width: 20ch;
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(1.85rem, 5.2vw, 3.5rem);
  line-height: 1.2; letter-spacing: -.02em;
  color: #fff;
  text-wrap: balance;
}

/* Second slide: the name set as type, not the logo file. */
.intro-mark { margin: 0; display: grid; justify-items: center; gap: .45em; text-align: center; }
.intro-mark-initials {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(3.4rem, 13vw, 8.5rem); line-height: 1; letter-spacing: -.035em;
  color: #fff;
}
.intro-mark-name {
  font-family: var(--font-head); font-weight: 500;
  font-size: clamp(.78rem, 2.2vw, 1.35rem); line-height: 1.3;
  letter-spacing: .28em; text-transform: uppercase; text-indent: .28em;
  color: var(--cyan-light);
}

/* Third slide: the two live sites. */
.intro-work { display: grid; justify-items: center; gap: 26px; text-align: center; }
.intro-work-label {
  margin: 0;
  font-family: var(--font-head); font-size: .78rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; text-indent: .16em;
  color: var(--cyan);
}
.intro-work-links {
  margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 48px;
}
.intro-work-links a {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(1.5rem, 4.6vw, 3rem); letter-spacing: -.02em;
  color: #fff; text-decoration: none;
  transition: color .16s ease;
}
.intro-work-links a:hover { color: var(--cyan-light); text-decoration: underline; }

/* The loop itself. All three slides share one keyframe track and each starts a
   third of a turn after the last, so only one is ever on screen. */
@keyframes introCycle {
  0%,  100% { opacity: 0; transform: translateY(16px) scale(.985); pointer-events: none; }
  6%,  27%  { opacity: 1; transform: none; pointer-events: auto; }
  33%       { opacity: 0; transform: translateY(-12px) scale(1.015); pointer-events: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .intro-stage > * { grid-area: 1 / 1; }   /* stack them in the same cell */
  .intro-line { animation: introCycle var(--loop) ease-in-out infinite both; }
  .intro-mark { animation: introCycle var(--loop) ease-in-out infinite both;
                animation-delay: calc(var(--loop) / 3); }
  .intro-work { animation: introCycle var(--loop) ease-in-out infinite both;
                animation-delay: calc(var(--loop) / 3 * 2); }

  /* Tab into a work link and the slide stops and stays put, so the loop can
     never pull a link out from under the keyboard. */
  .intro-work:focus-within { animation: none; opacity: 1; transform: none; z-index: 2; }
}

/* Scroll cue — static, never part of the loop. */
.intro-cue {
  position: absolute; z-index: 1; left: 50%; transform: translateX(-50%);
  bottom: clamp(26px, 6vh, 54px);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-head); font-size: .74rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-mute); text-decoration: none;
  transition: color .2s ease;
}
.intro-cue:hover { color: var(--cyan-light); text-decoration: none; }

.intro-chevron {
  width: 11px; height: 11px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
@media (prefers-reduced-motion: no-preference) {
  .intro-chevron { animation: cueNudge 2.4s ease-in-out infinite; }
}
@keyframes cueNudge {
  0%, 100% { transform: translateY(0) rotate(45deg); }
  50%      { transform: translateY(5px) rotate(45deg); }
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; }

/* ---------- Contact ---------- */
.contact {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-lift) 100%);
  padding: clamp(90px, 15vh, 160px) 0;
}
.contact h2 { color: #fff; }
.contact-inner { max-width: 760px; margin-inline: auto; text-align: center; }
.contact-sub { color: var(--text-soft); max-width: 52ch; margin-inline: auto; }

.contact-label {
  font-family: var(--font-head); font-size: .8rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--text-mute);
  margin: 46px 0 10px;
}
.contact-email {
  display: inline-block;
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(1.5rem, 4.4vw, 2.6rem); letter-spacing: -.02em;
  color: var(--cyan-light); word-break: break-word;
  transition: color .16s ease, transform .16s ease;
}
.contact-email:hover { color: #fff; text-decoration: none; transform: translateY(-2px); }

.contact-actions {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 34px;
}
.copy-note { margin: 16px 0 0; font-size: .9rem; color: var(--cyan-light); min-height: 1.3em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: var(--text-mute); padding: 48px 0 36px; font-size: .92rem; }
.footer-inner { display: grid; gap: 22px; justify-items: center; text-align: center; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 14px; }
.footer-brand p { margin: 0; color: #D3DEE6; font-family: var(--font-head); font-weight: 500; }
.footer-mark {
  font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; letter-spacing: -.03em;
  background: linear-gradient(135deg, var(--cyan-light), var(--cyan-dark));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 28px; }
.footer-nav a { color: var(--text-mute); }
.footer-nav a:hover { color: #fff; text-decoration: none; }
.copyright { margin: 0; width: 100%; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .08); color: #6D7E8B; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .contact-actions .btn { flex: 1 1 100%; }
}

@media (max-width: 420px) {
  .brand-name { display: none; }
}

/* Never let the scroll-reveal or the loop hide content when printing. */
@media print {
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .intro-line, .intro-mark, .intro-work { animation: none !important; opacity: 1 !important; transform: none !important; }
  .intro-stage > * { grid-area: auto !important; }
  .intro-cue { display: none; }
  .site-header { position: static; opacity: 1 !important; visibility: visible !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
}
