/* Shared components: entrance animation, reveal, buttons, nav, footer.
   Values ported 1:1 from the approved Claude Design export. Phone layout = max-width 479px. */
:root { --k: 1; --ease-out: cubic-bezier(0.22, 1, 0.36, 1); }
@media (max-width: 479px) { :root { --k: 0.8; } }

@keyframes dmIn { from { opacity: 0; transform: translateY(var(--ty, 12px)) scale(var(--sc, 1)); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes dmMask { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes dmPop { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes dmBlobIn { from { opacity: 0.55; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }
@keyframes dmLogoFadeIn { from { opacity: 0.7; } to { opacity: 1; } }
@keyframes dmLogoSweep { from { background-position: -120% 0; } to { background-position: 220% 0; } }
@keyframes dmStepIn { from { opacity: 0.25; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Entrance (set --delay / --dur / --ty / --sc inline) */
.dm-anim { opacity: 0; animation: dmIn calc(var(--dur, 400ms) * var(--k)) var(--ease-out) calc(var(--delay, 0ms) * var(--k)) both; }
.dm-anim-mask { animation: dmMask calc(580ms * var(--k)) var(--ease-out) calc(450ms * var(--k)) both; }
.dm-anim-pop { opacity: 0; animation: dmPop calc(250ms * var(--k)) var(--ease-out) calc(975ms * var(--k)) both; }
.dm-anim-blob { opacity: 0; animation: dmBlobIn calc(1500ms * var(--k)) var(--ease-out) 0ms both; }

/* Buttons */
.dm-btn { transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out); }
.dm-btn:hover { transform: translateY(-2px); }
.dm-btn:active { transform: translateY(0) scale(0.98); }
.dm-btn:focus-visible { outline: 2px solid rgba(60, 58, 53, 0.55); outline-offset: 3px; }
.dm-btn-primary:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -8px rgba(0, 0, 0, 0.32); }
.dm-btn-primary:active { transform: translateY(-1px) scale(0.98); }
.dm-magnetic { will-change: transform; }

/* Arrow travel */
.dm-arrow { border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dm-arrow-travel { overflow: hidden; position: relative; }
.dm-arrow-icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1), opacity 500ms cubic-bezier(0.16, 1, 0.3, 1); }
.dm-arrow-icon-next { transform: translateX(-140%); opacity: 0; }
.dm-btn:focus-visible .dm-arrow-icon-cur, .dm-workcard:focus-within .dm-arrow-icon-cur { transform: translateX(140%); opacity: 0; }
.dm-btn:focus-visible .dm-arrow-icon-next, .dm-workcard:focus-within .dm-arrow-icon-next { transform: translateX(0); opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .dm-btn:hover .dm-arrow-icon-cur, .dm-workcard:hover .dm-arrow-icon-cur { transform: translateX(140%); opacity: 0; }
  .dm-btn:hover .dm-arrow-icon-next, .dm-workcard:hover .dm-arrow-icon-next { transform: translateX(0); opacity: 1; }
}

/* Nav links / socials */
.dm-navlink { position: relative; display: inline-block; transition: opacity 220ms ease; }
.dm-navlink::after { content: ''; position: absolute; left: 0; bottom: -6px; width: 100%; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 380ms ease-out; }
.dm-navlink:hover { opacity: 0.72; }
.dm-navlink:hover::after { transform: scaleX(1); }
.dm-navlink.dm-nav-active { font-weight: 600; }
.dm-navlink.dm-nav-active::after { transform: scaleX(1); }
.dm-navlink:focus-visible { outline: 2px solid rgba(0, 0, 0, 0.35); outline-offset: 4px; }
.dm-social { transition: transform 200ms var(--ease-out), opacity 200ms ease; }
.dm-social:hover { transform: translate(2px, -2px); opacity: 0.82; }
.dm-social:focus-visible { outline: 2px solid rgba(0, 0, 0, 0.35); outline-offset: 4px; border-radius: 4px; }

/* Scroll reveal */
.dm-reveal { opacity: 0; transform: translateY(30px); transition: opacity 650ms var(--ease-out), transform 650ms var(--ease-out); }
.dm-reveal-sm { opacity: 0; transform: translateY(16px); transition: opacity 450ms var(--ease-out), transform 450ms var(--ease-out); }
.dm-reveal-card { opacity: 0; transform: translateY(30px) scale(0.97); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.dm-reveal-media { opacity: 0; transform: scale(0.96); transition: opacity 700ms ease-out, transform 700ms ease-out; }
.dm-reveal-fade { opacity: 0; transition: opacity 700ms ease-out; }
.dm-reveal.dm-in, .dm-reveal-sm.dm-in { opacity: 1; transform: translateY(0); }
.dm-reveal-card.dm-in { opacity: 1; transform: translateY(0) scale(1); }
.dm-reveal-media.dm-in { opacity: 1; transform: scale(1); }
.dm-reveal-fade.dm-in { opacity: 1; }
.dm-reveal-mask-wrap { overflow: hidden; display: block; }
.dm-reveal-mask-inner { display: block; transform: translateY(100%); transition: transform 650ms var(--ease-out); }
.dm-reveal-mask-wrap.dm-in .dm-reveal-mask-inner { transform: translateY(0); }
.dm-stagger > *:nth-child(1) { transition-delay: 0ms; }
.dm-stagger > *:nth-child(2) { transition-delay: 110ms; }
.dm-stagger > *:nth-child(3) { transition-delay: 220ms; }
.dm-stagger > *:nth-child(4) { transition-delay: 330ms; }
.dm-stagger > *:nth-child(5) { transition-delay: 440ms; }
.dm-stagger > *:nth-child(6) { transition-delay: 550ms; }
@media (max-width: 479px) {
  .dm-stagger > *:nth-child(2) { transition-delay: 60ms; }
  .dm-stagger > *:nth-child(3) { transition-delay: 120ms; }
  .dm-stagger > *:nth-child(4) { transition-delay: 180ms; }
  .dm-stagger > *:nth-child(5) { transition-delay: 240ms; }
  .dm-stagger > *:nth-child(6) { transition-delay: 300ms; }
}

/* Hero exit + page exit */
.dm-hero-exit-target { transition: opacity 500ms ease-out, transform 500ms ease-out; }
.dm-hero-line1 { transition: opacity 500ms ease-out, transform 500ms ease-out; }
.dm-hero-line2 { transition: transform 500ms ease-out, letter-spacing 500ms ease-out; }
.dm-hero-exit-target.dm-exit .dm-hero-line1 { opacity: 0.32; transform: translateY(-6px); }
.dm-hero-exit-target.dm-exit .dm-hero-line2 { transform: scale(1.015); }
.dm-page-root.dm-page-exit { opacity: 0; transform: translateY(-16px); transition: opacity 380ms var(--ease-out), transform 380ms var(--ease-out); }
.dm-workcard.dm-card-leaving { opacity: 0.85; transform: scale(1.015); transition: opacity 380ms var(--ease-out), transform 380ms var(--ease-out); }

/* Skip link */
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: #35363c; color: #fff; padding: 10px 16px; border-radius: 9999px; }
.skip-link:focus { top: 12px; color: #fff; }

/* Nav */
.nav-spacer { height: 84px; }
.nav {
  position: fixed; top: 33px; left: max(16px, calc(50% - 554.5px)); right: max(16px, calc(50% - 554.5px)); z-index: 50;
  max-width: 1109px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 19px 24px; background: rgba(255, 255, 255, 0.53); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-radius: 68px;
}
.nav.is-ready { transition: transform 520ms cubic-bezier(0.4, 0, 0.2, 1), opacity 480ms ease; }
.nav.is-ready.is-hidden { transform: translateY(-110%); opacity: 0; transition-duration: 450ms, 400ms; }
.nav-logo { position: relative; display: inline-flex; line-height: 0; flex-shrink: 0; }
.nav-logo img { height: clamp(18px, 2.6vw, 24px); width: auto; cursor: pointer; opacity: 0.7; animation: dmLogoFadeIn 550ms var(--ease-out) 40ms both; }
.nav-logo-sweep {
  position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url(../assets/icons/damnnn-logo.svg) no-repeat 0 0 / 100% 100%; mask: url(../assets/icons/damnnn-logo.svg) no-repeat 0 0 / 100% 100%;
  background: linear-gradient(100deg, transparent 42%, rgba(255, 255, 255, 0.9) 50%, transparent 58%) no-repeat; background-size: 300% 100%;
  mix-blend-mode: screen; animation: dmLogoSweep 550ms var(--ease-out) 40ms both;
}
.nav-links { display: flex; align-items: center; gap: clamp(16px, 4vw, 76px); }
.nav-links a { display: inline-flex; align-items: center; padding: 14px 0; margin: -14px 0; font-size: 1rem; font-weight: 500; color: #000; white-space: nowrap; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.btn-contact { background: #000305; color: #fff; font-weight: 700; font-size: 1rem; padding: 15px 26px; border-radius: 9999px; box-shadow: 0 20px 39px -7px rgba(0, 0, 0, 0.26); white-space: nowrap; }
.btn-contact:hover { color: #fff; }
.nav-menu-btn { display: none; justify-content: center; align-items: center; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 9999px; background: #35363c; color: #fff; cursor: pointer; flex-shrink: 0; box-shadow: 0 20px 39px -7px rgba(0, 0, 0, 0.26); }
.nav-menu-btn svg { width: 22px; height: 22px; }
.nav-sheet {
  position: fixed; bottom: 0; left: 0; right: 0; max-height: 80vh; z-index: 61; display: none; flex-direction: column; gap: 28px;
  background: rgba(255, 255, 255, 0.92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 -20px 39px -7px rgba(0, 0, 0, 0.26); border-radius: 24px 24px 0 0; padding: 20px 24px 28px;
}
.nav-sheet.is-open { display: flex; }
.nav-sheet-handle { width: 40px; height: 4px; border-radius: 9999px; background: rgba(0, 0, 0, 0.15); margin: 0 auto; }
.nav-sheet-head { display: flex; justify-content: space-between; align-items: center; }
.nav-sheet-head img { height: 20px; width: auto; }
.nav-sheet-close { display: flex; justify-content: center; align-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 9999px; background: rgba(0, 0, 0, 0.06); color: #000; cursor: pointer; }
.nav-sheet-close svg { width: 20px; height: 20px; }
.nav-sheet nav { display: flex; flex-direction: column; gap: 26px; }
.nav-sheet nav a { font-size: 1.125rem; font-weight: 500; color: #000; }
.nav-sheet .btn-contact { text-align: center; }
@media (max-width: 779px) {
  .nav-links, .nav-actions { display: none; }
  .nav-menu-btn { display: flex; }
}
@media (max-width: 479px) {
  .nav { padding: 13px 16px; border-radius: 36px; }
  .nav-logo img { height: 18px; }
  .nav-menu-btn { width: 44px; height: 44px; }
}

/* Footer */
.footer { padding-inline: 16px; }
.footer-card {
  position: relative; width: 100%; margin: 0 auto; overflow: hidden; background: rgb(60, 58, 53);
  border-radius: clamp(32px, 5vw, 90px) clamp(32px, 5vw, 90px) 0 0; padding: clamp(40px, 5vw, 80px) clamp(32px, 5vw, 70px);
  display: flex; flex-direction: column; gap: 70px;
}
.footer-cta { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 32px; align-items: center; width: 100%; text-align: center; }
.footer-heading { display: flex; flex-direction: column; align-items: center; }
.footer-eyebrow { color: #fff; font-size: 2.25rem; font-weight: 500; line-height: 1.15; }
.footer-headline { margin-top: 12px; color: #fff; font-size: 3rem; font-weight: 700; line-height: 1.15; }
.footer-sub { margin: 0 auto; color: rgba(255, 255, 255, 0.6); font-size: 1.5rem; font-weight: 500; line-height: 1.4; max-width: 620px; }
.footer-buttons { display: flex; flex-direction: row; gap: 32px; align-items: center; justify-content: center; }
.btn-footer-primary { display: inline-flex; align-items: center; justify-content: center; gap: 12px; background: #fff; color: #1d1d1f; font-weight: 700; font-size: 0.9375rem; height: 60px; border-radius: 9999px; padding: 0 9px 0 22px; box-shadow: 0 17px 32px -6px rgba(0, 0, 0, 0.26); }
.btn-footer-primary:hover { color: #1d1d1f; }
.btn-footer-primary .dm-arrow { width: 43px; height: 43px; background: #3c3a35; }
.btn-footer-primary .dm-arrow svg { width: 20px; height: 20px; color: #fff; }
.btn-footer-secondary { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 1.125rem; height: 60px; border-radius: 9999px; padding: 0 26px; box-shadow: inset 0 0 0 1.5px #fff; }
.btn-footer-secondary:hover { color: #fff; }
.footer-bar { position: relative; z-index: 1; background: rgba(0, 0, 0, 0.28); border-radius: 40px; padding: 40px 48px; display: flex; flex-direction: column; gap: 28px; }
.footer-bar-top { display: flex; flex-direction: row; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; flex-direction: column; gap: 28px; align-items: flex-start; }
.footer-brand > img { height: 58px; width: auto; }
.footer-nav { display: flex; flex-flow: row wrap; gap: 16px; align-items: center; }
.footer-nav a { color: rgba(255, 255, 255, 0.7); font-size: 1rem; font-weight: 400; }
.footer-nav a:hover { color: rgba(255, 255, 255, 0.7); }
.footer-follow { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.footer-follow-label { color: #fff; font-size: 1rem; font-weight: 500; }
.footer-social { display: flex; flex-direction: row; gap: 16px; align-items: center; }
.footer-social:hover { color: inherit; }
.footer-social span.txt { color: #fff; font-size: 1rem; font-weight: 500; }
.footer-li-badge { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 7px; background: rgb(9, 102, 194); flex-shrink: 0; }
.footer-li-badge img { width: 15.45px; height: 15.45px; }
.footer-social > img { width: 24px; height: 24px; flex-shrink: 0; }
.footer-divider { position: relative; z-index: 1; height: 1px; background: rgba(255, 255, 255, 0.09); }
.footer-copy { position: relative; z-index: 1; text-align: center; color: rgba(255, 255, 255, 0.6); font-size: 0.875rem; font-weight: 400; }
@media (max-width: 479px) {
  .footer { padding-inline: 16px; }
  .footer-card { border-radius: 28px 28px 0 0; padding: 32px 20px; gap: 40px; }
  .footer-cta { gap: 20px; align-items: flex-start; max-width: 900px; width: auto; text-align: left; }
  .footer-heading { align-items: flex-start; }
  .footer-eyebrow { font-size: 1.25rem; }
  .footer-headline { font-size: 1.75rem; }
  .footer-sub { margin: 0; font-size: 1rem; }
  .footer-buttons { flex-direction: column; gap: 16px; align-items: stretch; justify-content: flex-start; width: 100%; }
  .btn-footer-primary { font-size: 1rem; }
  .btn-footer-secondary { font-size: 1rem; }
  .footer-bar { border-radius: 20px; padding: 24px 20px; gap: 20px; }
  .footer-bar-top { flex-direction: column; gap: 24px; align-items: flex-start; }
  .footer-brand { gap: 16px; }
  .footer-brand > img { height: 44px; }
  .footer-nav { gap: 12px; }
  .footer-nav a { font-size: 0.875rem; }
}

@media (prefers-reduced-motion: reduce) {
  .dm-anim, .dm-anim-mask, .dm-anim-pop, .dm-anim-blob, .nav-logo img { animation: none !important; opacity: 1 !important; }
  .nav-logo-sweep { display: none !important; }
  .dm-reveal, .dm-reveal-sm, .dm-reveal-card, .dm-reveal-media, .dm-reveal-fade, .dm-reveal-mask-inner, .dm-hero-exit-target, .dm-hero-line1, .dm-hero-line2 { opacity: 1 !important; transform: none !important; transition: none !important; }
  .dm-btn, .dm-navlink, .dm-social, .dm-arrow-icon, .dm-workcard, .dm-workcard-img { transition: none !important; }
  .dm-btn:hover, .dm-btn:active, .dm-btn-primary:hover, .dm-btn-primary:active, .dm-workcard:hover, .dm-social:hover { transform: none !important; }
  .dm-page-root.dm-page-exit, .dm-workcard.dm-card-leaving { opacity: 1 !important; transform: none !important; transition: none !important; }
  .nav.is-ready.is-hidden { display: none; }
}
