/* ==========================================================================
   DESIGN PORTFOLIO — style.css
   Layout, palette, type scale and motion modelled on a Webflow portfolio
   template. All copy, imagery, logos and fonts are original / free-licensed.

   Breakpoints (same as the reference):
     ≤ 991px  tablet
     ≤ 767px  mobile landscape
     ≤ 479px  mobile portrait
   ========================================================================== */


/* --------------------------------------------------------------------------
   0. OPTIONAL LOCAL FONT
   The reference uses "Coolvetica Rg Cond". If you own it, drop the file into
   assets/fonts/ and uncomment this block — it is already first in the stack.
   -------------------------------------------------------------------------- */
/*
@font-face {
  font-family: "Coolvetica Rg Cond";
  src: url("../assets/fonts/Coolvetica-Rg-Cond.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
*/


/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Colours */
  --c-blush: #fbe7e4;          /* page background / light text */
  --c-red: #f34a2f;            /* primary accent + text */
  --c-red-soft: #ef34a2f;       /* button hover fill */
  --c-menu: #ffd5ce;           /* mobile dropdown */
  --c-white: #ffffff;

  /* Fonts */
  --f-body: "Inter", sans-serif;
  --f-display: "Coolvetica Rg Cond", "Antonio", "Arial Narrow", Arial, sans-serif;

  /* Type scale */
  --fs-base: 14px;
  --fs-h4: 1.4rem;             /* 22.4px — project titles */
  --fs-h5: 1.2rem;             /* 19.2px — nav, buttons, links */
  --fs-label: 1.1rem;          /* 17.6px — small uppercase labels */
  --fs-footer: 15px;
  --fs-cta: 25vw;              /* "Let's talk" */

  /* Spacing */
  --gutter: 2%;
  --gap: 10px;
  --radius-card: 20px;
  --radius-footer: 40px;

  /* Easing (matched to the reference interactions) */
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
  --ease-in-out-sine: cubic-bezier(0.445, 0.05, 0.55, 0.95);
  --ease-button: cubic-bezier(0.614, 0.03, 0, 0.983);
}


/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--c-blush);
  color: var(--c-red);
  font-family: var(--f-body);
  font-size: var(--fs-base);
  font-weight: 500;
  line-height: 1.1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
video { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3, p, address { margin: 0; font-style: normal; }

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

.container {
  position: relative;
  z-index: 30;
  width: 100%;
  margin: 0 auto;
}

/* Small uppercase label (hero info row, footer headings) */
.label {
  font-family: var(--f-display);
  font-size: var(--fs-label);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.label--light { color: var(--c-blush); }

.visually-hidden,
.hero__name {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}


/* --------------------------------------------------------------------------
   3. PAGE WRAPPER (slides over the sticky footer)
   -------------------------------------------------------------------------- */
.page-main {
  position: relative;
  z-index: 5;
  background-color: var(--c-blush);
}


/* --------------------------------------------------------------------------
   4. NAVIGATION
   -------------------------------------------------------------------------- */
.nav-sticky {
  position: sticky;
  top: 0;
  z-index: 9999;
}

.navbar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  column-gap: 10px;
  align-items: center;
  width: 100%;
  padding: 20px var(--gutter);
}

/* Logo "NR©" */
.nav-logo {
  grid-area: 1 / 1 / 2 / 2;
  display: flex;
  align-items: center;
  text-decoration: none;
}
.nav-logo__text {
  font-family: var(--f-display);
  font-size: var(--fs-h5);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.nav-logo__mark {
  font-family: var(--f-body);
  font-size: var(--fs-h5);
  font-weight: 400;
  line-height: 0.85;
}

/* Right side: pill button */
.nav-end {
  grid-area: 1 / 6 / 2 / 7;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 9px;
}

/* Rounded pill button — soft fill rises from below on hover */
.btn-pill {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 2.7rem;
  padding: 0.6em 1.25em;
  overflow: hidden;
  border-radius: 50em;
  background-color: var(--c-red);
  color: var(--c-blush);
  font-family: var(--f-display);
  font-size: var(--fs-h5);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.btn-pill > .btn-pill__text {
  display: block;
  transition: transform 0.5s var(--ease-button);
}
.btn-pill__hover {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 50rem;
  pointer-events: none;
}
.btn-pill__fill {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50rem;
  background-color: var(--c-red-soft);
  color: var(--c-white);
  transform: translateY(100%);
  transition: transform 0.5s var(--ease-button);
}
.btn-pill:hover > .btn-pill__text,
.btn-pill:focus-visible > .btn-pill__text { transform: translateY(150%); }
.btn-pill:hover .btn-pill__fill,
.btn-pill:focus-visible .btn-pill__fill { transform: translateY(0); }



/* --------------------------------------------------------------------------
   5. HERO
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 60vh;
  padding: var(--gutter);
  overflow: hidden;
  background-color: var(--c-blush);
}

/* Bottom info row (sits beneath the big name, like the reference) */
.hero__info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 30px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  align-items: end;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.hero__info-text { max-width: 200px; }
.hero__info-location { grid-column: 3 / 4; }
.hero__info-badge {
  grid-column: 4 / 5;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero__info-icon { width: 18px; height: 18px; }

/* WebGL name canvas — drawn on top of the info row */
.hero__canvas-wrap {
  position: absolute;
  top: -8%;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero__canvas {
  display: block;
  width: 100%;
  height: 100%;
}


/* --------------------------------------------------------------------------
   6. SELECTED WORK
   -------------------------------------------------------------------------- */
.section {
  position: relative;
  z-index: 10;
  padding: var(--gutter);
  background-color: var(--c-blush);
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
.work-grid + .work-grid { margin-top: var(--gap); }
.work-grid--single { grid-template-columns: 1fr; }

.work-card { position: relative; }

.work-card__link {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-card);
  text-decoration: none;
  /* keeps the radius clipping crisp while children transform (Safari) */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  transform: translateZ(0);
}

.work-card__media {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 10px;
  background: #f8f7f4;
}
.work-card--wide .work-card__media { aspect-ratio: 16 / 9; }
.work-card__media picture { display: contents; }

/* Show the complete design in the preview instead of cropping its top/bottom.
   Clicking the card opens the original image in a scrollable new tab. */
.work-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transform: scale(1);
  transform-origin: center;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  backface-visibility: hidden;
}
.work-card__video { z-index: 1; }

/* Hover zoom (mouse), keyboard focus and a brief press on touch screens */
@media (hover: hover) {
  .work-card__link:hover .work-card__img { transform: scale(1.01); }
}
.work-card__link:focus-visible .work-card__img,
.work-card__link:active .work-card__img { transform: scale(1.01); }

/* Client logo centred on the photo */
.work-card__logo {
  position: relative;
  z-index: 2;
  width: 120px;
  max-width: 120px;
  height: 120px;
}

/* Title */
.work-card__title {
  display: flex;
}

/* Frosted blur fading up from the bottom edge */
.work-card__blur {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: 30%;
  pointer-events: none;
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 100%);
  mask-image: linear-gradient(to top, #000 10%, transparent 100%);
}

/* Title + year */
.work-card__meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 15px 16px;
  pointer-events: none;
}
.work-card__title,
.work-card__year {
  font-family: var(--f-display);
  font-size: var(--fs-h4);
  font-weight: 500;
  line-height: 0.85;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--c-blush);
}
.work-card__year {
  display: flex;
  align-items: flex-end;
  gap: 3px;
}
.work-card__copy {
  font-family: var(--f-body);
  font-size: var(--fs-h5);
}

/* Empty marker after the work grid — its scroll position drives the footer */
.footer-trigger { height: 0; }


/* --------------------------------------------------------------------------
   7. FOOTER
   -------------------------------------------------------------------------- */
.footer {
  position: sticky;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  margin: -2px auto 0;
  padding: 3% 4% 4%;
  overflow: hidden;
  transform: translate3d(0, 25px, 0) scale(0.9);
  transform-origin: 50% 50%;
}

/* Red rounded panel behind the footer content */
.footer__bg {
  position: absolute;
  inset: 0;
  margin: var(--gutter);
  border-radius: var(--radius-footer);
  background-color: var(--c-red);
}

/* "Let's talk" CTA */
.cta {
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  cursor: none;
  text-decoration: none;
}
.cta__title {
  font-family: var(--f-display);
  font-size: var(--fs-cta);
  font-weight: 400;
  line-height: 0.85;
  letter-spacing: -5px;
  text-transform: uppercase;
  color: var(--c-blush);
}

/* Cursor-following circle — position set by JS, scale on hover */
.cta__circle {
  position: absolute;
  top: 27px;
  left: 0;
  pointer-events: none;
  will-change: transform;
}
.cta__circle-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 13rem;
  min-height: 13rem;
  border-radius: 100%;
  background-color: var(--c-red);
  mix-blend-mode: luminosity;
  transform: scale(0);
  transition: transform 0s var(--ease-in-out-sine);
}
.cta:hover .cta__circle-inner {
  transform: scale(1);
  transition-duration: 0.4s;
}
.cta__smile {
  width: 70px;
  animation: spin 10s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Columns */
.footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.footer__cols {
  grid-column: 2 / 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.footer__links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 15px;
}
.footer__text {
  margin-bottom: 10px;
  font-family: var(--f-body);
  font-size: var(--fs-footer);
  line-height: 1.3;
  letter-spacing: -0.2px;
  text-transform: uppercase;
  color: var(--c-blush);
}
.footer__text--spaced { margin-top: 20px; }

/* Address on the left half; Contact (email + phone) and Credits on the right */
.footer__col--address { grid-column: 1 / 2; }
.footer__col--address .footer__text { max-width: 22em; }
.footer__col--contact { grid-column: 1 / 3; }
.footer__col--credits { grid-column: 3; }

/* Link with rolling text + underline that draws in on hover */
.line-link {
  position: relative;
  display: block;
  font-family: var(--f-display);
  font-size: var(--fs-h5);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--c-blush);
}
.line-link__text {
  display: block;
  height: 22px;
  overflow: hidden;
}
.line-link__text > span {
  display: block;
  height: 20px;
  transition: transform 0.3s ease;
}
.line-link__line {
  position: relative;
  display: block;
  width: 100%;
  height: 1px;
  background-color: rgba(251, 231, 228, 0.5);
}
.line-link__line > span {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  display: block;
  width: 0;
  height: 1px;
  background-color: var(--c-blush);
  transition: width 0.3s ease;
}
.line-link:hover .line-link__text > span,
.line-link:focus-visible .line-link__text > span { transform: translateY(-100%); }
.line-link:hover .line-link__line > span,
.line-link:focus-visible .line-link__line > span { width: 100%; }


/* --------------------------------------------------------------------------
   8. ENTRANCE ANIMATIONS (activated by JS adding .js to <html>)
   slideInTop / slideInBottom — 1000ms outQuart, 100px travel
   -------------------------------------------------------------------------- */
.js [data-reveal] {
  opacity: 0;
  transition: opacity 1s var(--ease-out-quart), transform 1s var(--ease-out-quart);
}
.js [data-reveal="top"] { transform: translate3d(0, -100px, 0); }
.js [data-reveal="bottom"] { transform: translate3d(0, 100px, 0); }
.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}
/* The hero info row is absolutely positioned — keep its offsets */
.js .hero__info[data-reveal].is-revealed { transform: none; }


/* --------------------------------------------------------------------------
   9. RESPONSIVE
   -------------------------------------------------------------------------- */

/* ---------- Tablet ---------- */
@media screen and (max-width: 991px) {
  :root { --fs-cta: 20vw; }

  .navbar {
    grid-template-columns: 1fr 1fr 1fr;
    justify-content: space-between;
    padding: 1% var(--gutter);
  }
  .nav-end { grid-area: 1 / 3 / 2 / 4; gap: 15px; }

  .hero { min-height: 50vh; }
  .hero__info { width: 95%; padding: 0; }

  .work-card__logo { width: 115px; height: 115px; }

  .footer {
    position: relative;
    min-height: auto;
    gap: 80px;
    margin-top: 0;
    padding: 6% 5%;
  }
  .footer__bg { border-radius: 20px; }
  .footer__grid { display: flex; flex-direction: column; gap: 60px; }
  .cta__title { letter-spacing: -2px; }
  .cta__circle-inner { min-width: 6rem; min-height: 6rem; }
  .cta__smile { width: 50px; }
}

/* ---------- Mobile landscape ---------- */
@media screen and (max-width: 767px) {
  :root { --fs-cta: 15vw; }

  .navbar { display: flex; justify-content: space-between; align-items: center; }
  .nav-end { gap: 5px; }
  .btn-pill { font-size: 0.9rem; }

  .hero {
    min-height: auto;
    padding-top: 90px;
    padding-bottom: 221px;
  }
  .hero__info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0.6rem;
  }
  .hero__info-badge { justify-self: auto; }

  .work-card__meta { gap: 0.5rem; }

  .footer { padding-bottom: 2%; }
  .footer__cols { grid-template-columns: 1fr 1fr; gap: 50px; }
  .footer__col--contact { grid-column: auto; }
  .footer__col--credits { grid-column: auto; }
}

/* ---------- Mobile portrait ---------- */
@media screen and (max-width: 479px) {
  :root {
    --fs-label: 1rem;
    --fs-cta: 30vw;
  }

  .navbar { column-gap: 5px; }
  .nav-logo { flex: none; }

  .hero {
    padding-top: 100px;
    padding-bottom: 220px;
  }
  .hero__info {
    gap: 7px;
    align-items: center;
    text-align: center;
  }
  .hero__canvas-wrap { top: -24%; }

  .work-grid { grid-template-columns: 1fr; }
  .work-card--wide .work-card__media { aspect-ratio: 1 / 1; }
  .work-card__logo { width: 100px; max-width: 100px; height: 100px; }

  .footer {
    gap: 50px;
    padding-top: 40px;
    padding-bottom: 20px;
  }
  .footer__cols { grid-template-columns: 1fr; gap: 50px 30px; }
  .cta__title { letter-spacing: 0.3px; }
  .cta__circle-inner { min-width: 4.6rem; min-height: 4.6rem; }
  .cta__smile { width: 30px; }
}


/* --------------------------------------------------------------------------
   10. REDUCED MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .cta__smile { animation: none; }
  .footer { transform: none !important; }
}
