/* Prince Creations — landing page
   Source: Figma "PrinceCreates2026" › My Website › Desktop - 1 (node 6273:3), 1440px frame. */

/* ---------- Fonts ----------
   The design is set in Seravek (Apple system font). Apple devices use it natively;
   everywhere else falls back to "Prince Creations Sans": static instances of Source Sans 3
   (OFL, renamed per its Reserved Font Name clause) at wght 375 / 700, sized 103% so stroke
   weight, line length and baseline match the Seravek render in Figma to within ~2%. */
@font-face {
  font-family: "Prince Creations Sans";
  src: url("../fonts/pc-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  size-adjust: 103%;
}
@font-face {
  font-family: "Prince Creations Sans";
  src: url("../fonts/pc-sans-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  size-adjust: 103%;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --color-bg: #060808;
  --color-text: #ffffff;
  --color-accent: #5dafc9;

  --font-display: Seravek, "Prince Creations Sans", sans-serif;
  --font-ui: Inter, system-ui, sans-serif;

  --container: 1140px;
  --gutter: clamp(20px, 10.42vw, 150px);

  --radius-button: 4px;
  --radius-tile: 8px;
}

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

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

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

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  padding: 8px 16px;
  background: var(--color-accent);
  color: var(--color-bg);
  font-family: var(--font-ui);
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus {
  transform: none;
}

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

/* ---------- Header ---------- */
.site-header {
  padding-block-start: clamp(24px, 6.18vw, 89px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: block;
  width: clamp(80px, 7.31vw, 105.24px);
  aspect-ratio: 105.24 / 83;
}
.site-logo img {
  width: 100%;
  height: 100%;
}

.site-nav ul {
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  min-width: 96px;
  font-family: var(--font-ui);
  font-size: 20px;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  transition: color 0.2s ease;
}
.site-nav a:hover {
  color: var(--color-accent);
}

/* Main site header (Desktop - 2): Work/Info boxes are 106px, 30px before Contact. */
.site-nav--main a {
  min-width: 106px;
}
.site-nav--main li:last-child a {
  min-width: 96px;
}
.site-nav--main li:last-child {
  margin-inline-start: 10px;
}

/* ---------- Hero ---------- */
.hero {
  padding-block-start: clamp(56px, 9.72vw, 140px);
}

.hero__title,
.section-title {
  margin: 0;
  font-size: clamp(40px, 5.21vw, 75px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: 0.01em;
}

.hero__intro {
  max-width: 758px;
  margin: clamp(12px, 1.18vw, 17px) 0 0;
  font-size: clamp(18px, 12px + 0.834vw, 24px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

/* Manual line breaks from the design; only applied where the text is at (near) design size,
   otherwise the natural wrap and the forced breaks fight and leave short lines. */
.hero__intro br {
  display: none;
}
@media (min-width: 1400px) {
  .hero__intro br {
    display: inline;
  }
}

/* Label sits 59px from the left and 9px from the top, as placed in the Figma component. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 212px;
  min-height: 53px;
  margin-block-start: clamp(24px, 2.15vw, 31px);
  padding: 9px 24px 8px 59px;
  border-radius: var(--radius-button);
  background: var(--color-accent);
  color: var(--color-bg);
  font-family: var(--font-display);
  font-size: clamp(20px, 16px + 0.556vw, 24px);
  line-height: 1.5;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: filter 0.2s ease;
}
.button:hover {
  filter: brightness(1.1);
}

/* ---------- Work grid ---------- */
.work {
  padding-block: clamp(64px, 17.08vw, 246px) clamp(64px, 10.42vw, 150px);
}

.work__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px clamp(12px, 1.81vw, 26px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tile {
  position: relative;
  aspect-ratio: 557 / 558;
  overflow: hidden;
  border-radius: var(--radius-tile);
  background: var(--color-accent);
}

/* Each image keeps the size and offset it has inside its 557×558 mask in Figma,
   expressed as percentages so it scales with the tile. */
.tile img {
  position: absolute;
  max-width: none;
  left: calc(var(--x) / 557 * 100%);
  top: calc(var(--y) / 558 * 100%);
  width: calc(var(--w) / 557 * 100%);
  height: calc(var(--h) / 558 * 100%);
}

/* ---------- About (main site) ---------- */
.about {
  position: relative;
  padding-block-start: clamp(48px, 8.33vw, 120px);
  /* the portrait runs past the right edge (the Figma frame clips it); clip sideways only,
     so it can still extend down behind the brands section */
  overflow-x: clip;
}

/* Portrait: 1075×1434 at x=620/y=243 of the 1440 frame, i.e. 470px into the 1140 column.
   It runs off the right edge and fades into the background (Figma "Rectangle 18" gradient). */
.about__portrait {
  --col: min(100% - 2 * var(--gutter), var(--container));
  position: absolute;
  top: min(71px, 4.93vw);
  left: calc((100% - var(--col)) / 2 + var(--col) * 0.41228);
  width: calc(var(--col) * 0.94298);
  aspect-ratio: 1075 / 1434;
  pointer-events: none;
}
.about__portrait img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.about__portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgb(6 8 8 / 0) 0.49%, var(--color-bg) 79.05%);
}

.about__content,
.logos,
.site-footer {
  position: relative;
  z-index: 1;
}

.about__text {
  max-width: 709px;
  margin-block-start: clamp(10px, 1.04vw, 15px);
  font-size: clamp(18px, 12px + 0.834vw, 24px);
  line-height: 1.25;
  letter-spacing: 0.01em;
}
.about__text p {
  margin: 0 0 1.25em;
}
.about__text p:last-child {
  margin-block-end: 0;
}

/* Rag-fixing breaks from the design, only at design size (see .hero__intro br). */
.about__text br.rag {
  display: none;
}
@media (min-width: 1400px) {
  .about__text br.rag {
    display: inline;
  }
}
@media (max-width: 1399px) {
  .hero__intro,
  .about__text p {
    text-wrap: pretty;
  }
}

/* ---------- Logo clouds ---------- */
.logos--brands {
  padding-block-start: clamp(80px, 13.61vw, 196px);
}
.logos--agencies {
  padding-block-start: clamp(80px, 14.98vw, 215.73px);
}

/* Logos keep their Figma positions: --x/--y/--w in design px within a --gw×--gh group,
   converted to percentages so the whole group scales with the column. */
.logo-cloud {
  position: relative;
  width: min(100%, calc(var(--gw) / 1140 * 100%));
  aspect-ratio: var(--gw) / var(--gh);
  margin: clamp(28px, 3.61vw, 52px) 0 0;
  padding: 0;
  list-style: none;
}
.logos--agencies .logo-cloud {
  margin-block-start: clamp(24px, 2.5vw, 36px);
  margin-inline-start: calc(-2 / 1140 * 100%);
}
.logo-cloud li {
  position: absolute;
  left: calc(var(--x) / var(--gw) * 100%);
  top: calc(var(--y) / var(--gh) * 100%);
  width: calc(var(--w) / var(--gw) * 100%);
}
.logo-cloud img {
  width: 100%;
  height: auto;
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: clamp(72px, 13.15vw, 189.41px) clamp(48px, 7.08vw, 101.93px);
}

.social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social__link {
  position: relative;
  display: block;
  transition: opacity 0.2s ease;
}
.social__link:hover {
  opacity: 0.75;
}
.social__link img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

@media (max-width: 899px) {
  .about {
    padding-block-start: 24px;
  }
  .about__portrait {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    margin-block-end: -50%;
  }

  .logo-cloud,
  .logos--agencies .logo-cloud {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 28px 32px;
    width: auto;
    aspect-ratio: auto;
    margin-inline-start: 0;
  }
  .logo-cloud li {
    position: static;
    width: calc(var(--w) * 0.6px);
  }
}

@media (max-width: 640px) {
  .site-nav ul {
    gap: 16px;
  }
  .site-nav a,
  .site-nav--main a,
  .site-nav--main li:last-child a {
    min-width: 0;
    font-size: 16px;
  }
  .site-nav--main li:last-child {
    margin-inline-start: 0;
  }

  .section-title {
    text-wrap: balance;
  }

  .social {
    gap: 18px;
  }
  .social li {
    zoom: 0.75;
  }

  .hero__title br {
    display: none;
  }

  .work__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .tile--empty {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
