:root {
  --paper: #F5F1E8;
  --ink: #141414;
  --blue: #2457FF;
  --line: rgba(20,20,20,.16);
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background-color: var(--paper);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-position: center top;
  background-size: 4.5rem 4.5rem;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.5;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  min-height: 44px;
  padding: 0.7rem 1rem;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline-color: var(--paper);
}

.site-header,
.site-footer,
.hero,
.section-grid,
.contact {
  width: min(100%, 88rem);
  margin: 0 auto;
  padding-right: clamp(1.25rem, 5vw, 4rem);
  padding-left: clamp(1.25rem, 5vw, 4rem);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5.5rem;
  border-bottom: 1px solid var(--line);
}

.brand,
.header-contact,
.text-link,
.email-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.brand {
  gap: 0.75rem;
  color: var(--blue);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.045em;
  text-decoration: none;
}

.brand-mark {
  width: 1.9rem;
  height: 1.9rem;
}

.header-contact,
.text-link {
  font-size: 0.9rem;
  font-weight: 700;
  text-underline-offset: 0.28em;
}

.hero {
  display: grid;
  align-content: center;
  min-height: min(48rem, calc(100svh - 5.5rem));
  padding-top: clamp(5rem, 12vh, 9rem);
  padding-bottom: clamp(5rem, 12vh, 9rem);
}

.eyebrow,
.section-label,
.card-number {
  margin: 0;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.94;
}

h1 {
  max-width: 11ch;
  margin: clamp(1.25rem, 3vw, 2.25rem) 0 1.75rem;
  font-size: clamp(3.35rem, 9vw, 8.25rem);
}

.hero-copy {
  max-width: 33rem;
  margin-bottom: 2rem;
  font-size: clamp(1.125rem, 1.8vw, 1.45rem);
  line-height: 1.4;
}

.hero-link {
  width: fit-content;
  gap: 0.7rem;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) minmax(0, 3fr);
  gap: clamp(2.25rem, 6vw, 6rem);
  padding-top: clamp(4.75rem, 10vw, 9rem);
  padding-bottom: clamp(4.75rem, 10vw, 9rem);
  border-top: 1px solid var(--line);
}

.section-content {
  max-width: 56rem;
}

h2 {
  max-width: 12ch;
  margin-bottom: 1.5rem;
  font-size: clamp(2.35rem, 5.5vw, 5rem);
}

.section-content > p {
  max-width: 40rem;
  margin-bottom: 0;
  font-size: clamp(1.06rem, 1.6vw, 1.3rem);
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.focus-card {
  display: flex;
  min-height: 15.5rem;
  flex-direction: column;
  padding: 1.4rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.focus-card h3 {
  margin: auto 0 0.85rem;
  font-size: clamp(1.55rem, 2.6vw, 2.35rem);
}

.focus-card p {
  margin-bottom: 0;
  font-size: 0.96rem;
  line-height: 1.42;
}

.work-content {
  min-height: 18rem;
}

/* Selected work — project panels */
.work .section-content {
  max-width: none;
}

.project-panels {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
}

.project-panel {
  display: flex;
  align-items: center;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  padding: clamp(1.75rem, 4vw, 3.25rem);
  border-radius: 1rem;
  color: #F2F0EA;
  transition: transform 0.35s ease, box-shadow 0.35s ease, opacity 0.6s ease, translate 0.6s ease;
}

.project-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.panel-gridmind {
  background-color: #14120E;
  background-image: radial-gradient(ellipse at 18% 45%, rgba(224, 123, 0, 0.26), transparent 55%);
}

.panel-cosmicmerge {
  flex-direction: row-reverse;
  background-image: linear-gradient(135deg, #0D0A1E 0%, #151038 60%, #1D1147 100%);
}

.panel-book {
  background-color: #0A0A0A;
}

.panel-dustpan {
  background-color: #0E1420;
  background-image: radial-gradient(ellipse at 22% 50%, rgba(42, 120, 214, 0.3), transparent 58%);
}

.panel-tag {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.panel-gridmind .panel-tag,
.panel-gridmind .panel-cta {
  color: #FFB85C;
}

.panel-cosmicmerge .panel-tag,
.panel-cosmicmerge .panel-cta {
  color: #A58CFF;
}

.panel-book .panel-tag,
.panel-book .panel-cta {
  color: #F59E0B;
}

.panel-dustpan .panel-tag,
.panel-dustpan .panel-cta {
  color: #7CC4FF;
}

.project-panel h3 {
  margin: 0.5rem 0 0.9rem;
  font-size: clamp(1.9rem, 3.2vw, 3rem);
}

.panel-text > p:not(.panel-tag) {
  max-width: 34rem;
  margin-bottom: 0;
  font-size: clamp(1rem, 1.3vw, 1.13rem);
  line-height: 1.55;
  opacity: 0.85;
}

.panel-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  margin-top: 0.9rem;
  font-weight: 700;
  text-underline-offset: 0.28em;
}

.panel-cta span {
  transition: transform 0.25s ease;
}

.panel-cta:hover span {
  transform: translateX(4px);
}

.panel-cosmicmerge .panel-text {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.panel-devices {
  display: flex;
  flex-shrink: 0;
  align-items: flex-end;
  gap: 1.25rem;
}

.device-iphone {
  position: relative;
  width: clamp(11rem, 16vw, 15rem);
  aspect-ratio: 1470 / 3000;
  filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.6));
}

.device-iphone video {
  position: absolute;
  left: 5.102%;
  top: 2.267%;
  width: 89.796%;
  height: 95.5%;
  object-fit: cover;
  background: #000;
  border-radius: 6.5% / 3.1%;
}

.device-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.device-watch {
  position: relative;
  width: clamp(8.5rem, 12vw, 11.5rem);
  aspect-ratio: 600 / 960;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6));
}

.device-watch video {
  position: absolute;
  left: 14.833%;
  top: 23.229%;
  width: 70.333%;
  height: 53.542%;
  object-fit: cover;
  background: #000;
  border-radius: 28.4% / 23.3%;
}

.cm-visual {
  position: relative;
  flex-shrink: 0;
  width: clamp(14rem, 30vw, 22rem);
}

.cm-visual > img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.85rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

.cm-wordmark {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
  padding-bottom: 10%;
}

.cm-word {
  background-image: linear-gradient(90deg, #9EE8FF, #E6D9FF 45%, #FFC37A);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.9));
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 200;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
}

.cm-sub {
  margin-top: 0.4rem;
  color: rgba(240, 238, 255, 0.75);
  font-size: 0.6rem;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
}

.book-visual {
  flex-shrink: 0;
  width: clamp(10rem, 18vw, 14rem);
}

.book-visual img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
}

.dustpan-visual {
  flex-shrink: 0;
  width: clamp(10rem, 17vw, 14rem);
}

.dustpan-visual img {
  display: block;
  width: 100%;
  height: auto;
}

/* Scroll reveal — only when JS is running AND motion is welcome.
   `translate` (not `transform`) so the hover lift composes independently. */
@media (prefers-reduced-motion: no-preference) {
  html.js .project-panel {
    opacity: 0;
    translate: 0 1.5rem;
  }

  html.js .project-panel.is-visible {
    opacity: 1;
    translate: none;
  }
}

.contact {
  min-height: min(34rem, 75svh);
  padding-top: clamp(5rem, 12vw, 10rem);
  padding-bottom: clamp(5rem, 12vw, 10rem);
  background: var(--blue);
  color: var(--paper);
}

.contact .section-label {
  color: var(--paper);
}

.contact h2 {
  max-width: 12ch;
  margin: clamp(2.2rem, 5vw, 4.25rem) 0;
  font-size: clamp(3rem, 7.5vw, 7rem);
}

.email-link {
  min-height: 48px;
  color: var(--paper);
  font-size: clamp(1.125rem, 2.2vw, 1.7rem);
  font-weight: 750;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

.email-link:focus-visible {
  outline-color: var(--paper);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.4rem;
  padding-bottom: 1.4rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 700;
}

@media (max-width: 48rem) {
  .section-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .focus-grid {
    grid-template-columns: 1fr;
  }

  .focus-card {
    min-height: 12rem;
  }

  .project-panel,
  .panel-cosmicmerge {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel-devices,
  .cm-visual,
  .book-visual,
  .dustpan-visual {
    align-self: center;
  }

  .cm-visual,
  .book-visual,
  .dustpan-visual {
    width: min(100%, 18rem);
  }

  .panel-cosmicmerge .panel-text {
    align-items: flex-start;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
