/* ==========================================================================
   georgekovacs.me — rebuilt from the Framer original
   Breakpoints match Framer: desktop ≥1100, tablet 768–1099, phone <768
   ========================================================================== */

:root {
  --black: #000;
  --gray: #555;          /* small text: 7.5:1 on white */
  --gray-display: #666;  /* large display text only */
  --line: #e6e6e6;
  --white: #fff;
  --surface: #f0f0f0;

  --font-display: "Manrope", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --container: 1100px;
  --gutter: 40px;
  --header-h: 86px;

  --fs-display: 64px;
  --fs-h2: 32px;
  --fs-h3: 24px;
  --fs-body: 18px;

  --page-top: 160px;
  --page-bottom: 240px;
  --section-gap: 160px;
  --block-gap: 80px;

  /* Easing curves lifted from the Framer project */
  --ease-reveal: cubic-bezier(0.35, 0, 0, 1);   /* appear: 1–1.5s tween */
  --ease-text: cubic-bezier(0, 0.46, 0.56, 1);  /* hero line effect */
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1); /* approximates spring(500, 60) */
}

@media (max-width: 1099px) {
  :root {
    --fs-display: 52px;
    --fs-h2: 26px;
    --fs-h3: 22px;
    --page-bottom: 200px;
    --section-gap: 120px;
  }
}

@media (max-width: 767px) {
  :root {
    --gutter: 24px;
    --header-h: 70px;
    --fs-display: 32px;
    --fs-h2: 22px;
    --fs-h3: 20px;
    --page-top: 120px;
    --page-bottom: 160px;
    --section-gap: 80px;
    --block-gap: 56px;
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 4px; }

.skip-link {
  position: fixed; left: 16px; top: 16px; z-index: 100;
  padding: 12px 20px; border-radius: 64px;
  background: var(--black); color: var(--white);
  font: 500 16px/1 var(--font-display);
  transform: translateY(-200%);
  transition: transform 0.3s var(--ease-spring);
}
.skip-link:focus { transform: none; }

.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

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

/* ---------- Type ---------- */

.display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-display);
  line-height: 1.2;
}
.muted { color: var(--gray); }
.display .muted { color: var(--gray-display); }

.label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.4;
}

.rich { font-family: var(--font-body); font-size: var(--fs-body); line-height: 1.7; }
.rich > * + * { margin-top: 20px; }
.rich h1 { font: 600 var(--fs-display)/1.2 var(--font-display); }
.rich h2 { font: 600 var(--fs-h2)/1.4 var(--font-display); }
.rich h3 { font: 700 var(--fs-h3)/1.4 var(--font-display); }
.rich h4 { font: 500 18px/1.4 var(--font-display); }
.rich ul, .rich ol { padding-left: 23px; }
.rich li + li { margin-top: 0; }
.rich a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.rich a:hover { text-decoration-thickness: 2px; }

/* ---------- Arrow icon ---------- */

.arrow {
  width: 16px; height: 16px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.45s var(--ease-spring);
}

/* ---------- Rolling text link (nav) ---------- */

.roll {
  display: inline-block;
  height: 1.4em;
  overflow: hidden;
  font: 500 18px/1.4 var(--font-display);
  vertical-align: top;
}
.roll__track {
  display: flex;
  flex-direction: column;
  transition: transform 0.45s var(--ease-spring);
}
.roll__track > span { display: block; white-space: nowrap; }
.roll__track > span + span { opacity: 0.6; }
.roll:hover .roll__track,
.roll:focus-visible .roll__track { transform: translateY(-50%); }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: transform 0.5s var(--ease-spring), background-color 0.3s ease, box-shadow 0.3s ease;
}
/* The original header re-appears transparent over content. Give it a surface once scrolled. */
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
}
.site-header.is-hidden { transform: translateY(-100%); }

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

.logo {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 32; /* Inter Display */
}

.nav { display: flex; gap: 40px; }
.nav .roll[aria-current="page"] .roll__track > span:first-child { opacity: 1; }

.menu-toggle {
  display: none;
  position: relative;
  width: 40px; height: 40px;
  border-radius: 64px;
  background: rgba(255, 255, 255, 0.9);
}
.menu-toggle span {
  position: absolute;
  left: 11px;
  width: 19px; height: 2px;
  border-radius: 2px;
  background: var(--black);
  transition: transform 0.45s var(--ease-spring), opacity 0.2s ease;
}
.menu-toggle span:nth-child(1) { top: 14px; }
.menu-toggle span:nth-child(2) { top: 19px; }
.menu-toggle span:nth-child(3) { top: 24px; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(5px); }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-5px); }

.mobile-menu {
  display: none;
  grid-template-rows: 0fr;
  background: var(--white);
  transition: grid-template-rows 0.5s var(--ease-spring);
}
.mobile-menu__inner { overflow: hidden; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 18px; padding: 8px 0 40px; }
.mobile-menu a {
  font: 500 20px/1.4 var(--font-display);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s ease, transform 0.45s var(--ease-spring);
}
.menu-open .mobile-menu { grid-template-rows: 1fr; }
.menu-open .mobile-menu a { opacity: 1; transform: none; }
.menu-open .mobile-menu a:nth-child(2) { transition-delay: 0.04s; }
.menu-open .mobile-menu a:nth-child(3) { transition-delay: 0.08s; }

@media (max-width: 767px) {
  .site-header { background: var(--white); }
  .nav { display: none; }
  .menu-toggle { display: block; }
  .mobile-menu { display: grid; }
}

/* ---------- Main / footer reveal ---------- */

main {
  position: relative;
  z-index: 2;
  background: var(--white);
  padding: var(--page-top) 0 var(--page-bottom);
}

.site-footer {
  position: relative;
  z-index: 1;
  background: var(--black);
  color: var(--white);
}
/* Curtain reveal: the page scrolls away over a pinned footer.
   Only where the footer fits on screen, so nothing gets trapped off-screen. */
@media (min-width: 768px) and (min-height: 820px) {
  .site-footer { position: sticky; bottom: 0; }
}

.footer-inner {
  display: flex;
  flex-direction: column;
  min-height: 650px;
  padding: 80px 0;
  box-sizing: content-box;
}
.footer-title { max-width: 550px; margin-top: 23px; }

.footer-label { font: 400 18px/1.7 var(--font-body); }

.footer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.footer-actions .btn { margin-top: 0; }

/* Copy email */
.copy-email {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 18px/1.4 var(--font-display);
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.copy-email .icon {
  width: 16px; height: 16px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.copy-email .icon-check,
.copy-email__done { display: none; }
.copy-email.is-copied .icon-copy,
.copy-email.is-copied .copy-email__text { display: none; }
.copy-email.is-copied .icon-check,
.copy-email.is-copied .copy-email__done { display: inline; }

.copy-email--footer {
  padding: 15px 24px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 64px;
}
.copy-email--footer:hover { border-color: rgba(255, 255, 255, 0.7); }
.copy-email--footer.is-copied { border-color: #34c759; color: #7ee29a; }

.email-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.email-row__link { font: 500 18px/1.4 var(--font-display); transition: opacity 0.3s ease; }
.email-row__link:hover { opacity: 0.6; }
.copy-email--inline { gap: 6px; font-size: 16px; color: var(--gray); }
.copy-email--inline:hover { color: var(--black); }
.copy-email--inline.is-copied { color: #1f8f3a; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin-top: 24px;
  padding: 16px 32px;
  border-radius: 64px;
  background: var(--surface);
  color: var(--black);
  font: 500 18px/1.4 var(--font-display);
  transition: background-color 0.3s ease, transform 0.45s var(--ease-spring);
}
.btn:hover { background: var(--white); }
.btn:active { transform: scale(0.97); }
.btn:hover .arrow,
.arrow-link:hover .arrow { transform: rotate(45deg); }

.footer-links { display: flex; flex-direction: column; gap: 24px; width: min(450px, 100%); margin-top: 64px; }
.footer-nav { display: flex; flex-direction: column; align-items: flex-start; gap: 13px; }

.arrow-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font: 500 18px/1.4 var(--font-display);
}
.arrow-link > span { transition: opacity 0.3s ease; }
.arrow-link:hover > span { opacity: 0.6; }

@media (max-width: 767px) {
  .footer-inner { min-height: 0; padding: 48px 0; }
  .footer-links { margin-top: 48px; }
}

/* ---------- Home ---------- */

.hero-intro { margin-bottom: 48px; }
.hero-intro a {
  color: var(--black);
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.3s ease;
}
.hero-intro a:hover { text-decoration-color: currentColor; }
.hero h1 { max-width: 1090px; } /* matches the original's line breaks at full width */

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin-top: 240px;
  scroll-margin-top: 120px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 500px;
}
.card__media {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 24px;
  overflow: hidden;
  isolation: isolate;
  background: var(--surface);
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-spring);
}
.card:hover .card__media img { transform: scale(1.06); }

.card__badge {
  position: absolute;
  left: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
}
.card__circle {
  position: absolute;
  left: 0;
  top: 50%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 200px;
  background: rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--white);
  transform: translateY(-50%);
  transition: width 0.45s var(--ease-spring), height 0.45s var(--ease-spring),
              background-color 0.3s ease, color 0.3s ease;
}
.card:hover .card__circle,
.card:focus-visible .card__circle {
  width: 56px;
  height: 56px;
  background: var(--white);
  color: var(--black);
}
.card:hover .arrow,
.card:focus-visible .arrow { transform: rotate(45deg); }

.card__text { display: flex; flex-direction: column; gap: 8px; }
.card__client { color: var(--gray); }
.card__title { font: 700 var(--fs-h3)/1.4 var(--font-display); }

@media (max-width: 1099px) {
  .work-grid { gap: 32px; margin-top: 160px; }
  .card { height: 440px; }
}
@media (max-width: 767px) {
  .hero-intro { margin-bottom: 32px; }
  .work-grid { grid-template-columns: 1fr; gap: 40px; margin-top: 80px; }
  .card { height: 400px; }
}

/* ---------- About ---------- */

.about-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.about-intro__text > * + * { margin-top: 24px; }
.about-intro__lede { font: 600 var(--fs-h2)/1.4 var(--font-display); }
/* Portrait fills the height of the text column without stretching the row */
.about-intro__media,
.contact-media { position: relative; }
.about-intro__media img,
.contact-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.split-section {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 16px;
  margin-top: var(--section-gap);
}
.split-section > h2 { font: 700 var(--fs-h3)/1.4 var(--font-display); }

@media (max-width: 1099px) {
  .split-section { grid-template-columns: 240px 1fr; }
}
@media (max-width: 767px) {
  .about-intro { grid-template-columns: 1fr; }
  .about-intro__media img { position: static; aspect-ratio: 4 / 5; height: auto; }
  .split-section { grid-template-columns: 1fr; gap: 16px; }
}

/* ---------- Contact ---------- */

.contact-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 64px;
}
.contact-intro > * + * { margin-top: 24px; }
.contact-intro .lede { font: 700 var(--fs-h3)/1.4 var(--font-display); }
.contact-info { margin-top: 64px; display: flex; flex-direction: column; gap: 48px; }
.contact-group > p { color: var(--gray); }
.contact-group > * + * { margin-top: 15px; }
.contact-group .stack { display: flex; flex-direction: column; gap: 16px; }
.contact-media { min-height: 0; }

@media (max-width: 1099px) {
  .contact-layout { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 767px) {
  .contact-layout { grid-template-columns: 1fr; }
  .contact-media img { position: static; aspect-ratio: 4 / 5; height: auto; }
}

/* ---------- Case study ---------- */

.case-title { max-width: 800px; }
.case-meta { display: flex; gap: 120px; margin-top: 80px; }
.case-meta dt { color: var(--gray); }
.case-meta dd { margin-top: 8px; }

.case-hero {
  margin-top: 80px;
  border-radius: 24px;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 1100 / 865;
  background: var(--surface);
}
.case-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.2);
  will-change: transform;
}

.case-body {
  display: flex;
  flex-direction: column;
  gap: var(--block-gap);
  margin-top: var(--block-gap);
}
.case-body > .rich { width: min(800px, 100%); margin-inline: auto; }

.case-figure img { width: 100%; border-radius: 24px; }
.case-figure figcaption { margin-top: 12px; text-align: center; }
.case-figure figcaption a { text-decoration: underline; text-underline-offset: 3px; }

.logo-gallery { display: flex; flex-direction: column; align-items: center; gap: 80px; margin-top: 80px; }
.logo-gallery img { width: min(808px, 100%); aspect-ratio: 808 / 550; object-fit: contain; }
.logo-gallery img:first-child { width: min(700px, 100%); aspect-ratio: 1; }

/* Next project (item 6) */
.next-project {
  margin-top: var(--section-gap);
  padding-top: 64px;
  border-top: 1px solid var(--line);
}
.next-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
}
.next-card__text { display: flex; flex-direction: column; gap: 8px; }
.next-card__client { margin-top: 16px; color: var(--gray); }
.next-card__title { font: 600 var(--fs-h2)/1.4 var(--font-display); }
.next-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font: 500 18px/1.4 var(--font-display);
}
.next-card__media { aspect-ratio: 530 / 376; flex: none; }
.next-card:hover .card__media img { transform: scale(1.06); }
.next-card:hover .card__circle { width: 56px; height: 56px; background: var(--white); color: var(--black); }
.next-card:hover .arrow { transform: rotate(45deg); }
.all-work { margin-top: 40px; }

@media (max-width: 767px) {
  .next-project { padding-top: 48px; }
  .next-card { grid-template-columns: 1fr; gap: 24px; }
  .next-card__media { order: -1; }
}

/* NDA notice (replaces the client-unfriendly password wall) */
.nda {
  display: grid;
  gap: 16px;
  justify-items: start;
  width: min(800px, 100%);
  margin: 80px auto 0;
  padding: 48px;
  border-radius: 24px;
  background: var(--surface);
}
.nda h2 { font: 600 var(--fs-h2)/1.4 var(--font-display); }
.nda .btn { margin-top: 8px; background: var(--black); color: var(--white); }
.nda .btn:hover { background: #222; }

@media (max-width: 767px) {
  .case-meta { gap: 48px; margin-top: 48px; }
  .case-hero { margin-top: 48px; border-radius: 16px; }
  .case-figure img { border-radius: 16px; }
  .nda { padding: 32px 24px; }
}

/* ---------- Motion ---------- */

/* Scroll appear — Framer: x 30→0, opacity 0→1, 1.5s, ease(.35,0,0,1), delay .2s */
.js [data-reveal] {
  opacity: 0;
  transform: translateX(var(--rx, 30px));
  transition:
    opacity var(--rd, 1.5s) var(--ease-reveal) calc(0.2s + var(--delay, 0s)),
    transform var(--rd, 1.5s) var(--ease-reveal) calc(0.2s + var(--delay, 0s));
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Hero text effect — Framer: per line, x 50→0, opacity 0→1, 0.5s, ease(0,.46,.56,1), delay .2s */
.js [data-split] { visibility: hidden; }
.js [data-split].is-split { visibility: visible; }
[data-split] .word {
  display: inline-block;
  opacity: 0;
  transform: translateX(50px);
  transition:
    opacity 0.5s var(--ease-text) calc(0.2s + var(--line, 0) * 0.1s),
    transform 0.5s var(--ease-text) calc(0.2s + var(--line, 0) * 0.1s);
}
[data-split].is-in .word { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    animation-duration: 0.01ms !important;
  }
  .js [data-reveal], [data-split] .word { opacity: 1; transform: none; }
  .case-hero img { transform: none; }
}
