:root {
  --ink: #191919;
  --muted: #8b8b8b;
  --coral: #e94b3c;
  --button: #dd8f88;
  --page-x: 100px;
  --page-top: 87px;
  --content-width: 1240px;
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  background: #fff;
}

body {
  margin: 0;
  min-width: 320px;
  background: #fff;
  color: var(--ink);
  font-family: "Figtree", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.page-shell {
  position: relative;
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: var(--page-top) var(--page-x) 0;
  overflow: hidden;
  background: #fff;
}

.site-header {
  width: 100%;
  max-width: var(--content-width);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 219px;
  height: auto;
}

.button {
  display: inline-flex;
  min-height: 64px;
  align-items: center;
  justify-content: center;
  padding: 20px 30px;
  border-radius: 999px;
  background: var(--button);
  color: #fff;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 180ms ease, filter 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  filter: brightness(0.98);
}

.button:focus-visible,
.footer-email:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

.hero {
  margin-top: 126px;
  max-width: 980px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(88px, 8.9vw, 128px);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.hero-subtitle {
  margin: 36px 0 0;
  font-size: 32px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.hero-copy {
  margin: 30px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 400;
}

.hero-button {
  margin-top: 59px;
}

.work {
  margin-top: 103px;
}

.work-kicker {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.3;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.work-card {
  margin: 0;
  min-width: 0;
  aspect-ratio: 615 / 440;
  overflow: hidden;
  border-radius: var(--radius);
  background: #f2f2f2;
}

.work-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-footer {
  position: relative;
  min-height: 220px;
  margin-top: 116px;
  overflow: hidden;
}

.footer-details {
  position: relative;
  z-index: 2;
  font-size: 14px;
  line-height: 1.25;
}

.footer-details p {
  margin: 0;
}

.footer-name {
  font-weight: 700;
}

.footer-email {
  display: inline-block;
  margin-top: 29px;
  text-decoration: none;
}

.footer-email:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-small {
  margin-top: 45px;
  color: #aaa;
  font-size: 12px;
  line-height: 1.25;
}

.footer-tortoise {
  position: absolute;
  z-index: 1;
  right: 95px;
  bottom: 0;
  width: 260px;
  height: auto;
  display: block;
  pointer-events: none;
}

@media (max-width: 900px) {
  :root {
    --page-x: 32px;
    --page-top: 36px;
    --radius: 18px;
  }

  .brand-logo {
    width: 185px;
  }

  .button--header {
    display: none;
  }

  .hero {
    margin-top: 92px;
    max-width: 650px;
  }

  .hero h1 {
    font-size: clamp(64px, 10.5vw, 92px);
    line-height: 0.98;
  }

  .hero-subtitle {
    margin-top: 28px;
    font-size: clamp(25px, 5vw, 32px);
  }

  .hero-copy {
    margin-top: 24px;
    font-size: 15px;
  }

  .hero-button {
    margin-top: 38px;
  }

  .work {
    margin-top: 94px;
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .work-card {
    aspect-ratio: 615 / 440;
  }

  .site-footer {
    min-height: 235px;
    margin-top: 82px;
  }

  .footer-tortoise {
    right: 8px;
    bottom: 0;
    width: 185px;
  }
}

@media (max-width: 520px) {
  :root {
    --page-x: 20px;
    --page-top: 24px;
    --radius: 16px;
  }

  .brand-logo {
    width: 165px;
  }

  .hero {
    margin-top: 72px;
  }

  .hero h1 {
    font-size: clamp(48px, 14.5vw, 68px);
    line-height: 0.98;
    letter-spacing: -0.03em;
  }

  .hero-subtitle {
    font-size: 25px;
    line-height: 1.15;
  }

  .hero-copy br {
    display: none;
  }

  .button {
    min-height: 58px;
    padding: 17px 26px;
    font-size: 18px;
  }

  .work {
    margin-top: 80px;
  }

  .work-kicker {
    font-size: 14px;
    margin-bottom: 18px;
  }

  .site-footer {
    min-height: 255px;
    margin-top: 70px;
  }

  .footer-details {
    max-width: 220px;
    font-size: 13px;
  }

  .footer-small {
    margin-top: 38px;
    font-size: 11px;
  }

  .footer-tortoise {
    right: 0;
    bottom: 8px;
    width: 145px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}


/* ---------------------------------------------------------
   Albert motion layer
   --------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: albertIntro 700ms cubic-bezier(.22, 1, .36, 1) forwards;
}

.reveal--1 {
  animation-delay: 80ms;
}

.reveal--2 {
  animation-delay: 180ms;
}

@keyframes albertIntro {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 650ms cubic-bezier(.22, 1, .36, 1),
    transform 650ms cubic-bezier(.22, 1, .36, 1);
  will-change: opacity, transform;
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.work-card.scroll-reveal:nth-child(2n) {
  transition-delay: 70ms;
}


/* Smoother gallery entrance */
.work-card.scroll-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 900ms cubic-bezier(.16, 1, .3, 1),
    transform 900ms cubic-bezier(.16, 1, .3, 1),
    box-shadow 360ms cubic-bezier(.22, 1, .36, 1);
}

.work-card.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.work-card.scroll-reveal:nth-child(2n) {
  transition-delay: 90ms;
}

.down-arrow {
  display: inline-block;
  transform-origin: center;
  animation: arrowBob 1.8s ease-in-out infinite;
}

@keyframes arrowBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* Buttons: subtle Albert tortoise reveal */
.button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transform: none;
  transition:
    padding-left 320ms cubic-bezier(.22, 1, .36, 1),
    padding-right 320ms cubic-bezier(.22, 1, .36, 1),
    background-color 220ms ease;
}

.button::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 50%;
  width: 0;
  height: 16px;
  background: url("assets/button-tortoise.svg") left center / 26px auto no-repeat;
  opacity: 0;
  transform: translateY(-50%) scale(.8);
  transform-origin: left center;
  transition:
    width 320ms cubic-bezier(.22, 1, .36, 1),
    opacity 180ms ease,
    transform 320ms cubic-bezier(.22, 1, .36, 1);
  pointer-events: none;
}

.button::after {
  content: none;
}

.button:hover {
  transform: none;
  filter: none;
  padding-left: 68px;
  padding-right: 34px;
}

.button:hover::before {
  width: 28px;
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.button:active {
  transform: none;
}

/* Gallery: subtle movement under glass */
.work-card {
  --parallax-x: 0px;
  --parallax-y: 0px;
  transform-origin: center;
  transition:
    box-shadow 360ms cubic-bezier(.22, 1, .36, 1);
}

.work-card img {
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  margin: -4px;
  object-fit: cover;
  transform: translate3d(var(--parallax-x), var(--parallax-y), 0) scale(1.012);
  transition:
    transform 220ms cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}

.work-card:hover {
  box-shadow: 0 14px 34px rgba(0,0,0,.06);
}

/* Logo gets a tiny nod without turning it into a gimmick */
.brand-logo {
  transition: transform 360ms cubic-bezier(.22, 1, .36, 1);
}

.brand:hover .brand-logo {
  transform: rotate(-5deg) translateY(-1px);
}

/* Tortoise: only wakes up when somebody reaches the footer */
.footer-tortoise.tortoise-arrive {
  animation: tortoiseArrive 850ms cubic-bezier(.22, 1, .36, 1) both;
}

.footer-tortoise.tortoise-shuffle {
  animation: tortoiseShuffle 1.15s cubic-bezier(.22, 1, .36, 1);
}

@keyframes tortoiseArrive {
  from {
    opacity: 0;
    transform: translate(18px, 8px) rotate(1.5deg);
  }
  to {
    opacity: 1;
    transform: translate(0, 0) rotate(0);
  }
}

@keyframes tortoiseShuffle {
  0%, 100% {
    transform: translate(0, 0) rotate(0);
  }
  42% {
    transform: translate(-5px, -2px) rotate(-0.6deg);
  }
  68% {
    transform: translate(-2px, 0) rotate(0.35deg);
  }
}

/* Small polish for links */
.footer-email {
  transition: opacity 180ms ease;
}

.footer-email:hover {
  opacity: .62;
}

/* Respect accessibility preferences */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .scroll-reveal,
  .down-arrow,
  .footer-tortoise,
  #hero-microcopy {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }

  .button,
  .work-card,
  .work-card img,
  .brand-logo {
    transition: none !important;
  }

  .button::before {
    transition: none !important;
  }

  .button:hover,
  .button:active,
  .work-card:hover,
  .work-card:hover img,
  .brand:hover .brand-logo {
    transform: none !important;
  }
}


@media (max-width: 390px) {
  .site-footer {
    min-height: 270px;
  }

  .footer-tortoise {
    right: 0;
    bottom: 10px;
    width: 128px;
  }
}


/* Rotating hero microcopy */
#hero-microcopy {
  display: inline-block;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 300ms ease,
    transform 300ms cubic-bezier(.22, 1, .36, 1);
}

#hero-microcopy.is-changing {
  opacity: 0;
  transform: translateY(5px);
}

/* Tiny studio status line */
.currently-line {
  margin: 0 0 40px !important;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.currently-line strong {
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 520px) {
  .currently-line {
    max-width: 250px;
    margin-bottom: 34px !important;
    font-size: 12px;
  }
}


/* ---------------------------------------------------------
   Rollback navigation
   Hides on scroll-down and returns on scroll-up.
   --------------------------------------------------------- */

.site-header {
  position: fixed;
  z-index: 1000;
  top: var(--page-top);
  left: 50%;
  width: min(calc(100vw - 200px), var(--content-width));
  padding-inline: 18px;
  transform: translateX(-50%);
  isolation: isolate;
  transition:
    top 420ms cubic-bezier(.22, 1, .36, 1),
    transform 420ms cubic-bezier(.22, 1, .36, 1),
    opacity 260ms ease;
  animation: navIntro 700ms cubic-bezier(.22, 1, .36, 1) 80ms both;
  will-change: transform, top;
}

.site-header::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -10px -14px;
  border: 1px solid rgba(25, 25, 25, 0.04);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.045);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: scale(.985);
  transition:
    opacity 300ms ease,
    transform 380ms cubic-bezier(.22, 1, .36, 1);
  pointer-events: none;
}

.site-header.is-scrolled {
  top: 22px;
}

.site-header.is-scrolled::before {
  opacity: 1;
  transform: scale(1);
}

.site-header.nav-hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(calc(-100% - 48px));
  pointer-events: none;
}

.site-header-spacer {
  height: 64px;
  width: 100%;
}

@keyframes navIntro {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@media (max-width: 900px) {
  .site-header {
    width: calc(100vw - 64px);
    padding-inline: 14px;
  }

  .site-header.is-scrolled {
    top: 18px;
  }

  .site-header::before {
    inset: -8px -10px;
  }

  .site-header-spacer {
    height: 40px;
  }
}

@media (max-width: 520px) {
  .site-header {
    width: calc(100vw - 40px);
    padding-inline: 12px;
  }

  .site-header.is-scrolled {
    top: 14px;
  }

  .site-header::before {
    inset: -7px -9px;
  }

  .site-header-spacer {
    height: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header {
    animation: none !important;
    transition: none !important;
  }

  .site-header::before {
    transition: none !important;
  }
}


/* Keep rollback nav controls above the glass layer and fully clickable */
.site-header > .brand,
.site-header > .button {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.site-header:not(.nav-hidden) {
  pointer-events: auto;
}

html {
  scroll-behavior: smooth;
}


/* ---------------------------------------------------------
   Mobile navigation
   Rollback behaviour is desktop-only.
   --------------------------------------------------------- */
@media (max-width: 900px) {
  .site-header {
    position: relative;
    z-index: 20;
    top: auto;
    left: auto;
    width: 100%;
    padding-inline: 0;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    animation: none;
    transition: none;
  }

  .site-header::before {
    display: none;
  }

  .site-header.is-scrolled,
  .site-header.nav-hidden {
    top: auto;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .site-header-spacer {
    display: none;
  }
}

/* ---------------------------------------------------------
   Branded scroll-to-top button
   --------------------------------------------------------- */
.scroll-top-button {
  position: fixed;
  z-index: 1100;
  right: 26px;
  bottom: 26px;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--coral);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.11);
  cursor: pointer;

  display: grid;
  place-items: center;

  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(.92);
  transition:
    opacity 240ms ease,
    visibility 240ms ease,
    transform 320ms cubic-bezier(.22, 1, .36, 1),
    box-shadow 240ms ease;
}

.scroll-top-button.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.scroll-top-button img {
  position: absolute;
  width: 28px;
  height: auto;
  display: block;
  transition: transform 320ms cubic-bezier(.22, 1, .36, 1);
}

.scroll-top-arrow {
  position: absolute;
  right: 8px;
  top: 5px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
  opacity: .9;
  transition: transform 260ms cubic-bezier(.22, 1, .36, 1);
}

.scroll-top-button:hover {
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.15);
  transform: translateY(-3px) scale(1);
}

.scroll-top-button:hover img {
  transform: translateY(-2px) rotate(-3deg);
}

.scroll-top-button:hover .scroll-top-arrow {
  transform: translateY(-2px);
}

.scroll-top-button:active {
  transform: translateY(0) scale(.96);
}

.scroll-top-button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

@media (max-width: 520px) {
  .scroll-top-button {
    right: 18px;
    bottom: 18px;
    width: 52px;
    height: 52px;
  }

  .scroll-top-button img {
    width: 25px;
  }

  .scroll-top-arrow {
    right: 7px;
    top: 5px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-top-button,
  .scroll-top-button img,
  .scroll-top-arrow {
    transition: none !important;
  }
}
