/* georgia-margot.com
   Type: Moderat (self-hosted, pending font files) with a neutral grotesque fallback.
   Scale from Figma: 40 / 16 / 13 / 12. Ground #FAFAFD, ink #000.
   Desktop grid: 1440 canvas, content column 122 -> 1197, right margin 50. */

@font-face {
  font-family: "Moderat";
  src: url("assets/fonts/Moderat-Regular.woff2") format("woff2"),
       url("assets/fonts/Moderat-Regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #000;
  --paper: #fafafd;
  --font: "Moderat", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --pad-left: clamp(20px, 8.47vw, 122px);
  --pad-right: clamp(20px, 3.47vw, 50px);
  --block-gap: clamp(48px, 5.55vw, 80px);
}

* { box-sizing: border-box; margin: 0; }

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

body {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--pad-right) 0 var(--pad-left);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4; /* 16px text: 140% per updated Figma styles */
  overflow-x: clip;
}

/* Soft glow behind the top of the page: blurred circle, lilac to peach to nothing */
body::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -46px;
  left: 44.6%;
  width: 717px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(180deg, #f9e8ff 0%, rgba(255, 241, 234, 0.99) 50%, rgba(255, 255, 255, 0) 100%);
  filter: blur(120px);
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration-style: solid; }

/* Header */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-top: 86px;
}

.wordmark { font-size: 16px; }

.site-nav {
  position: fixed;
  top: 48px;
  right: max(var(--pad-right), calc((100vw - 1440px) / 2 + 50px));
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 17px;
  text-align: right;
}

.site-nav a { text-decoration: none; font-size: 16px; }
.site-nav a:hover { text-decoration: underline; }
.site-nav .nav-icon { line-height: 0; }

/* Mobile menu (hidden on desktop) */

.menu-button, .menu-close {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  margin: -8px;
  color: var(--ink);
  cursor: pointer;
  line-height: 0;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: linear-gradient(180deg, #de21c9 13%, #ffbe4e 83%);
  color: #fff;
  padding: 40px var(--pad-right) 40px var(--pad-left);
  opacity: 0;
  visibility: hidden;
}

.mobile-menu.open { opacity: 1; visibility: visible; }

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.menu-close { display: block; color: #fff; }

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 44px;
  margin-top: 56px;
}

.mobile-menu-links a { text-decoration: none; font-size: 16px; }
.mobile-menu-links a:hover { text-decoration: underline; }

.menu-open, .menu-open body { overflow: hidden; }

/* Hero */

.hero { padding-top: 119px; }

.hero h1 {
  max-width: 861px;
  font-size: clamp(24px, 6.1vw, 40px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.hero .u {
  color: inherit;
  text-decoration: underline dotted 1.5px;
  text-underline-offset: 4px;
}
a.u:hover { text-decoration-style: solid; }

.hero-note { margin-top: 42px; font-size: 16px; }
.hero-note a { text-underline-offset: 3px; }

/* Projects — the content column stops at 1197/1440, clearing the sticky nav zone */

#projects { padding-right: clamp(0px, 13.4vw, 193px); }

.projects-title {
  margin-top: 110px;
  font-size: 16px;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.projects {
  list-style: none;
  padding: 0;
  margin-top: var(--block-gap);
}

.project { margin-bottom: var(--block-gap); }
.project:last-child { margin-bottom: 0; }

.project img {
  display: block;
  width: 100%;
  height: auto;
  background: #ececf0; /* holds the space until assets land */
}

.project figure > a { display: block; line-height: 0; }

.project figcaption {
  margin-top: 24px;
  font-size: 12px;
  line-height: normal; /* 12px captions stay on Figma's auto */
}

.kicker {
  font-size: 10px;
  vertical-align: 0.5em;
  margin-right: 2px;
}

.project-link { text-underline-offset: 2px; }

/* The stagger — widths and offsets as fractions of the 1076px content column */

.p-pendula, .p-uw { width: 77.23%; }
.p-dolby           { width: 54.74%; margin-left: auto; }
.p-gbg             { width: 54.65%; }
.p-twn             { width: 65.99%; margin-left: auto; }
.p-hm              { width: 100%; }
.p-gl              { width: 70.35%; }

/* Footer */

.site-footer {
  display: flex;
  justify-content: flex-end;
  padding: 126px 0 47px;
  font-size: 12px;
}

/* Small screens: single column, full width */

@media (max-width: 720px) {
  :root {
    /* equal 40px margins on mobile */
    --pad-left: clamp(20px, 9.35vw, 40px);
    --pad-right: clamp(20px, 9.35vw, 40px);
  }
  .site-header { padding-top: 40px; }
  .site-nav { display: none; }
  .menu-button { display: block; }
  .hero { padding-top: 64px; }
  .hero-note { margin-top: 28px; }
  .projects-title { margin-top: 72px; }
  #projects { padding-right: 0; }
  .p-pendula, .p-uw, .p-dolby, .p-gbg, .p-twn, .p-hm, .p-gl {
    width: 100%;
    margin-left: 0;
  }
  .project figcaption { margin-top: 16px; }
  .site-footer { padding: 72px 0 32px; }
}

/* Fades — all skipped for prefers-reduced-motion */

@media (prefers-reduced-motion: no-preference) {
  body { animation: page-fade 0.6s ease-out both; }

  .js .project {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  }
  .js .project.in-view { opacity: 1; transform: none; }

  .mobile-menu { transition: opacity 0.3s ease, visibility 0.3s; }
}

@keyframes page-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

