/* =========================================================
   Delicate Steve — style.css
   Colors and sizes you're most likely to change are in :root.
   ========================================================= */

:root {
  /* Colors */
  --bg:          #FBF5F3;   /* page background (warm off-white) */
  --ink:         #1B2A4A;   /* main text (dark navy) */
  --brand:       #2D5FD3;   /* logo, client names, email (cobalt) */
  --muted:       rgba(27, 42, 74, .72); /* directors + brand list (gray) */
  --sticker:     #FF6A3D;   /* FOR SALE sticker (tangerine) */
  --sticker-ink: #1B2A4A;   /* FOR SALE lettering */
  --tape:        rgba(246, 221, 128, .58); /* masking tape (yellow) */
  --paper:       #FFFDF8;   /* white edge around the photo */
  --focus:       #E0529C;   /* keyboard focus outline */
  --paper-ink:   #1B2A4A;   /* text printed on the white paper labels and cards (same in dark mode) */
  --paper-brand: #2D5FD3;   /* client names on the cards (same in dark mode) */

  /* Fonts */
  --font-main: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
  --font-bio:  'Courier Prime', 'Courier New', monospace;
}

/* Dark mode (phone/computer set to dark) */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg:    #1B2A4A;
    --ink:   #F4E3DE;
    --brand: #F4E3DE;
    --muted: rgba(244, 227, 222, .75);
  }
}


/* ---------- Basics ---------- */

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;   /* stop phones from enlarging small text */
          text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

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

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }



/* ---------- Layout: identity on the left, work on the right ---------- */

.page {
  max-width: 1500px;
  margin: 0 auto;
  padding: clamp(96px, 10vw, 140px) clamp(20px, 3vw, 40px) 72px;   /* top leaves room for SELECT CLIENTS */
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(28px, 2.6vw, 40px);
  align-items: start;
}

.side { align-self: stretch; display: flex; flex-direction: column; }   /* runs the full height so "more Delicate Steve" can sit at the bottom */


/* ---------- Photo (magazine cutout + tape + sticker) ---------- */

.cover {
  position: relative;
  filter: drop-shadow(0 0 1px rgba(27, 42, 74, .18))
          drop-shadow(0 5px 11px rgba(27, 42, 74, .07));
}
.cover::before { content: ""; display: block; padding-top: 100%; } /* keeps it at least square */

.cut {                            /* the paper cutout */
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1;
  background: var(--paper);
  transform: rotate(-.3deg);      /* slight hand-placed tilt */
  /* slightly uneven, scissor-cut edges */
  clip-path: polygon(0.18% 0.22%, 17.79% 0.49%, 30.10% 0.32%, 46.65% 0.49%, 68.02% 0.21%, 86.89% 0.53%,
    99.63% 0.19%, 99.44% 18.01%, 99.68% 30.65%, 99.69% 50.20%, 99.65% 64.10%, 99.60% 79.43%, 99.80% 99.77%,
    83.65% 99.48%, 66.40% 99.55%, 49.94% 99.55%, 33.66% 99.69%, 12.72% 99.44%, 0.07% 99.80%, 0.34% 80.49%,
    0.19% 68.08%, 0.15% 51.69%, 0.29% 31.29%, 0.30% 14.06%);
}
.cut img {
  position: absolute; top: 4px; left: 4px;  /* 4px = width of the white edge */
  width: calc(100% - 8px); height: calc(100% - 8px);
  object-fit: cover;
}

.tape {
  position: absolute; z-index: 3;
  width: 58px; height: 17px;
  background: var(--tape);
  clip-path: polygon(0 10%, 5% 0, 10% 12%, 15% 3%, 85% 0, 90% 10%, 95% 2%, 100% 12%,
    100% 88%, 95% 100%, 90% 90%, 85% 98%, 15% 100%, 10% 89%, 5% 98%, 0 90%); /* torn ends */
}
.tape-1 { top: -6px;    left: -17px;  transform: rotate(-38deg); }
.tape-2 { bottom: -6px; right: -17px; transform: rotate(-36deg); }

.sticker {
  position: absolute; z-index: 4;
  top: -24px; right: -20px;
  width: 70px; height: 70px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: var(--sticker);
  color: var(--sticker-ink);
  font-weight: 700; font-size: .66rem; line-height: .95; letter-spacing: .04em;
  transform: rotate(-14deg);
  transition: transform .35s cubic-bezier(.3, 1.6, .5, 1);
  /* starburst shape */
  clip-path: polygon(50% 0%, 59.1% 10%, 71.7% 5%, 75.6% 17.9%, 89.1% 18.8%, 86.9% 32.2%, 98.7% 38.9%,
    91% 50%, 98.7% 61.1%, 86.9% 67.8%, 89.1% 81.2%, 75.6% 82.1%, 71.7% 95%, 59.1% 90%, 50% 100%,
    40.9% 90%, 28.3% 95%, 24.4% 82.1%, 10.9% 81.2%, 13.1% 67.8%, 1.3% 61.1%, 9% 50%, 1.3% 38.9%,
    13.1% 32.2%, 10.9% 18.8%, 24.4% 17.9%, 28.3% 5%, 40.9% 10%);
}
.sticker .line-2 { font-size: 1.15em; }
.sticker i { display: inline-block; font-style: normal; }
/* tiny hand-lettered wobble on each letter */
.line-1 i:nth-child(1) { transform: rotate(-3deg); }
.line-1 i:nth-child(2) { transform: translateY(-.25px) rotate(2deg); }
.line-1 i:nth-child(3) { transform: translateY(.25px) rotate(-1.5deg); }
.line-2 i:nth-child(1) { transform: translateY(.25px) rotate(2.5deg); }
.line-2 i:nth-child(2) { transform: translateY(-.25px) rotate(-2deg); }
.line-2 i:nth-child(3) { transform: rotate(1.5deg); }
.line-2 i:nth-child(4) { transform: translateY(.25px) rotate(-2.5deg); }

.cover:hover .sticker { transform: rotate(8deg) scale(1.08); }




/* ---------- Left column text ---------- */

.logo { margin-top: 26px; }
.wordmark {
  display: block;
  width: 100%;
  aspect-ratio: 2150 / 280;        /* logo.png width / height */
  background: var(--brand);
  -webkit-mask: url("../images/logo.png") left center / contain no-repeat;
          mask: url("../images/logo.png") left center / contain no-repeat;
}

.bio {
  margin-top: 18px;
  font-family: var(--font-main);
  font-size: .84rem;
  line-height: 1.6;
}

.email {
  margin-top: 18px;
  align-self: flex-start;
  font-size: 1rem; font-weight: 600; letter-spacing: .01em;
  color: var(--brand);
  text-decoration: none;
}
.email:hover { color: var(--sticker); }

.brands {                          /* other brands, each on its own paper label */
  margin-top: 30px;
  display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 7px;   /* one line, edge to edge with the cards */
}
.brands span {
  display: inline-block; white-space: nowrap;
  padding: 5px clamp(7px, .7vw, 11px) 4px;
  background: var(--paper);
  color: var(--paper-ink);
  font-size: clamp(.72rem, .95vw, .88rem); letter-spacing: .03em; line-height: 1.3;   /* scales so the row fits */
  filter: drop-shadow(0 0 1px rgba(27, 42, 74, .14)) drop-shadow(0 3px 6px rgba(27, 42, 74, .06));
}
.brands span:nth-child(3n+1) { transform: rotate(-1.1deg); }
.brands span:nth-child(3n+2) { transform: rotate(.8deg) translateY(1px); }
.brands span:nth-child(3n)   { transform: rotate(-.4deg); }


/* ---------- Right column: client cards ---------- */

.work { position: relative; }

.list-label {                      /* heading on a paper label, sits just above the cards */
  position: absolute; left: 0; bottom: calc(100% + 16px);   /* so the photo and first row of cards line up */
  white-space: nowrap;
  display: inline-block;
  margin: 0;
  padding: 6px 10px 5px;
  background: var(--paper);
  color: var(--paper-ink);
  font-size: .76rem; font-weight: 700; letter-spacing: .1em;
  transform: rotate(-.6deg);
  filter: drop-shadow(0 0 1px rgba(27, 42, 74, .14)) drop-shadow(0 3px 6px rgba(27, 42, 74, .06));
}

.cards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.2vw, 16px);
}

/* each card is a small paper print, like the photo */
.cards li { display: flex; }        /* cards in a row share one height */
.card {
  flex: 1;
  width: 100%;
  cursor: pointer;                 /* cards open the player; they aren't links, so no address shows on hover */
  display: flex; flex-direction: column;
  padding: 7px 7px 12px;
  background: var(--paper);
  color: inherit; text-decoration: none;
  box-shadow: 0 0 1px rgba(27, 42, 74, .28), 0 5px 11px rgba(27, 42, 74, .07);
  transition: transform .25s ease;
}
.cards li:nth-child(odd)  .card { transform: rotate(-.35deg); }
.cards li:nth-child(even) .card { transform: rotate(.3deg); }

.card-img {
  position: relative; display: block;
  height: 0; padding-top: 75%;      /* 4:3 box that works in every browser, including older iPhones */
  overflow: hidden;
  background: #DAE2F5;
}
.card-img .still {                 /* the still (set in index.html) */
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(1.18) contrast(1.06) brightness(1.04);   /* bright and punchy */
  transition: transform .35s ease, filter .25s;
}
.card-img::after {                 /* play mark, shown on hover */
  content: ""; position: absolute; top: 50%; left: 50%;
  border-left: 15px solid #FFFDF8;
  border-top: 9px solid transparent; border-bottom: 9px solid transparent;
  transform: translate(-40%, -50%) scale(.7);
  opacity: 0; transition: opacity .2s, transform .2s;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .45));
}

.card-meta {
  flex: 1;                         /* if one title wraps, the whole row grows to match */
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  margin-top: 10px; padding: 0 2px;
}
.client {
  font-weight: 800; font-size: .96rem; letter-spacing: .03em;
  color: var(--paper-brand);
  white-space: nowrap;
  transition: color .15s;
}
.title {
  font-family: var(--font-bio);
  font-size: .84rem;
  color: #5A6378;
  text-align: right;
}

.card:hover .card-img .still,
.card:focus-visible .card-img .still { transform: scale(1.05); filter: saturate(1.25) contrast(1.07) brightness(1.1); }
.card:hover .card-img::after,
.card:focus-visible .card-img::after { opacity: .95; transform: translate(-40%, -50%) scale(1); }
.card:hover .client,
.card:focus-visible .client { color: var(--sticker); }


/* ---------- Link home (delicate.works), under the email ---------- */

.more-link {
  margin-top: auto;                /* pushed to the bottom of the left column */
  padding-top: 20px;
  margin-bottom: 5px;              /* lines up with the brand labels */
  align-self: flex-start;
  font-family: var(--font-bio);    /* typewriter, like the video titles */
  font-size: .8rem; letter-spacing: .02em;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}
.more-link:hover,
.more-link:focus-visible { color: var(--sticker); }

/* ---------- Award laurels on a card (On Cloud) ---------- */

.aw-laurels {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  display: flex;
  padding: 18px 6px 4px;
  background: linear-gradient(transparent, rgba(12, 16, 40, .42));   /* keeps the white readable */
}
.aw-laurel {
  position: relative; width: 62px; height: 62px;
  color: #FFFDF8;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .45));
}
.aw-laurel svg { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; }
.aw-txt {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 0 9px;
  font: 800 .51rem/1.05 var(--font-main); letter-spacing: 0; text-transform: uppercase;
  color: #FFFDF8;
}

/* award lines under the title in the video pop-up (first one gets a little space above) */
.player-caption .director + .awards { margin-top: 9px; }
.player-caption .awards {
  display: block; margin-top: 3px;
  font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: #8A6A1F;
}

/* ---------- Video pop-up ---------- */

.player {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: 72px clamp(20px, 6vw, 96px);
  background: var(--bg);
}
.player[hidden] { display: none; }
.player-box { width: min(1040px, 100%); }
.player video,
.player iframe {
  display: block; width: 100%; aspect-ratio: 16 / 9;
  background: #000; border: 0;
  box-shadow: 0 10px 30px rgba(27, 42, 74, .12);
}
/* vertical (portrait) videos: size to the screen height instead of a wide frame */
.player.is-vertical .player-box { width: auto; }
.player.is-vertical video {
  width: auto; height: calc(100svh - 230px); max-width: 100%;
  aspect-ratio: auto;
  margin: 0 auto;
}
.player iframe { display: none; }
.player.is-embed iframe { display: block; }
.player.is-embed video  { display: none; }

/* colored title block under the video */
.player-caption {
  display: inline-block;
  min-width: min(440px, 100%);
  margin-top: 16px;
  padding: 14px 20px 15px;
  background: var(--paper);           /* white paper label, like the brand labels */
  color: var(--paper-ink);
  transform: rotate(-.5deg);
  filter: drop-shadow(0 0 1px rgba(27, 42, 74, .16)) drop-shadow(0 3px 6px rgba(27, 42, 74, .08));
  font-size: 1.05rem; font-weight: 600; line-height: 1.4;
}
.player-caption b { font-weight: 700; letter-spacing: .02em; }
.player-caption b::after { content: " | "; font-weight: 400; opacity: .7; }
.player-caption .director { display: block; font-weight: 400; opacity: .85; }

/* thin X in the top-right corner */
.player-close {
  position: fixed; top: 18px; right: 22px;
  width: 48px; height: 48px;
  background: none; border: 0; cursor: pointer;
}
.player-close::before,
.player-close::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 46px; height: 2px; background: var(--ink);
  transition: background .15s;
}
.player-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.player-close::after  { transform: translate(-50%, -50%) rotate(-45deg); }
.player-close:hover::before,
.player-close:hover::after { background: var(--sticker); }

/* small logo in the bottom-right corner */
.player-mark {
  position: fixed; right: 26px; bottom: 22px;
  width: 150px; aspect-ratio: 2150 / 280;
  background: var(--brand);
  -webkit-mask: url("../images/logo.png") center / contain no-repeat;
          mask: url("../images/logo.png") center / contain no-repeat;
}
body.no-scroll { overflow: hidden; }




/* ---------- Medium screens ---------- */

@media (max-width: 1100px) {
  .brands { flex-wrap: wrap; justify-content: flex-start; }
  .page  { grid-template-columns: 252px minmax(0, 1fr); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* ---------- Phones ---------- */

@media (max-width: 760px) {
  .player   { padding: 64px 14px; }
  .player-close { top: 10px; right: 10px; }
  .player-close::before, .player-close::after { width: 34px; }
  .player-caption { font-size: .92rem; padding: 12px 16px; }
  .player-mark { width: 110px; right: 16px; bottom: 16px; }
  .page    { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 40px 22px 56px; }
  .side    { display: contents; }     /* lets the email move to the bottom of the page */
  .work    { margin-top: 44px; }
  .list-label { position: static; margin-bottom: 16px; }
  .aw-laurel { width: 40px; height: 40px; }   /* smaller laurels on the small phone cards */
  .aw-txt   { font-size: .36rem; padding: 0 6px; }
  .aw-laurels { padding: 10px 4px 2px; }
  .brands  { flex-wrap: wrap; justify-content: flex-start; gap: 8px; }
  .brands span { font-size: .78rem; padding: 5px 9px 4px; }
  .email   { order: 2; margin-top: 36px; }
  .more-link { order: 3; margin-top: 18px; padding-top: 0; margin-bottom: 0; }
  .sticker { top: -20px; right: -8px; width: 62px; height: 62px; font-size: .6rem; }
  .wordmark { width: min(320px, 88%); }
  .bio     { font-size: .84rem; }
  .cards   { gap: 16px 12px; }
  .card    { padding: 5px 5px 9px; }
  .card-meta { display: block; margin-top: 7px; }
  .client  { display: block; font-size: .84rem; }
  .title   { display: block; text-align: left; font-size: .74rem; margin-top: 2px; }
  .brands span { font-size: .78rem; padding: 5px 9px 4px; }
  .brands  { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .sticker, .card, .card-img .still, .card-img::after, .client { transition: none; }
}


/* ---------- Older browsers (e.g. iPhones before iOS 15) ---------- */
@supports not (aspect-ratio: 1) {
  .wordmark { height: 0; padding-top: 13.02%; }          /* logo shape when aspect-ratio isn't supported */
  .player video, .player iframe { height: 56.25vw; max-height: 70vh; }
}
@media (max-width: 760px) {
  @supports not (aspect-ratio: 1) { .wordmark { padding-top: 11.5%; } }
}
