/* ─────────────────────────────────────────────────────────────────────────────
   Marcel Pater — landing page
   Mobile-first: the base layout is a fluid centered stack — type scales with
   clamp(), and the two cards sit side-by-side as soon as they fit (flex-wrap).
   ≥ 1100px switches to the art-directed 1320×820 "desk" artboard, which main.js
   uniformly scales to fit the viewport (min scale ≈ 0.8, so it stays legible).
   Breakpoint is duplicated in main.js — change both together.
   ───────────────────────────────────────────────────────────────────────────── */

/* Theme core — tokens, reset, body base, .grain, #trail — lives in ../theme.css
   (linked first). This file holds the landing page's layout + its own background. */

body {
  /* landing-only background: the dot grid is baked into the body here (the
     portfolio page instead crossfades it as a separate layer) */
  background-image:
  /* Layer 1: The Dot Grid (1px dots, repeatable) */
    radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1.5px),
    /* Layer 1: Soft lighting gradient for depth */
    linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.35) 100%),
    
    /* Layer 2: MICRO GRAIN (Fine, sharp, high frequency) */
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='fineNoise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23fineNoise)' opacity='0.015'/%3E%3C/svg%3E"),
    
    /* Layer 3: MACRO GRAIN (Larger, softer paper fibers, low frequency) */
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='coarseNoise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.1' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23coarseNoise)' opacity='0.008'/%3E%3C/svg%3E");
  background-size: 16px 16px, auto, auto, auto;
  background-repeat: repeat;}

/* ── hero type ──
   Fluid between phone and desk sizes; the desk media query pins exact px. */
.hello { font-family: var(--hand); font-weight: 600; font-size: clamp(30px, 4.2vw, 34px); color: var(--accent); white-space: nowrap; line-height: 1; }
.name {
  font-family: var(--serif); font-weight: 500; font-size: clamp(46px, 7.5vw, 68px);
  letter-spacing: -0.02em; line-height: 0.92; color: var(--ink); white-space: nowrap;
}
.tagline { font-family: var(--hand); font-weight: 500; font-size: clamp(26px, 3.5vw, 31px); color: var(--ink); line-height: 1.12; }
.tagline b { font-weight: 700; color: var(--accent); }
.bio { font-family: var(--hand); font-weight: 500; font-size: clamp(19px, 2.5vw, 22px); color: var(--ink-soft); line-height: 1.18; }
.find-me { font-family: var(--hand); font-weight: 700; font-size: clamp(24px, 3vw, 27px); color: var(--accent); white-space: nowrap; line-height: 1; }

/* squiggle under the name — external svg/scribble.svg with the accent color
   baked in; keep it in sync with --accent if you retheme */
.squiggle { display: block; pointer-events: none; }

/* ── desk decorations (line-art doodles + washi tape) ──
   Hidden in the stacked layout; the desk layout shows and anchors them. */
.illo { position: absolute; pointer-events: none; display: none; }
/* washi tape = the sticker_01.svg graphic (rough edges + color baked in).
   drop-shadow follows the sticker's silhouette, not the element box.
   Per-tape look (rotation/size) is set in each tape's own rule — for this page
   that's `.card-portfolio .tape` in the desk media query below. */
.tape {
  position: absolute; width: 110px; height: 40px; display: none;
  background: url("svg/sticker_01.svg") center / 100% 100% no-repeat;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.35));
  z-index: 7;
}

/* ── destination cards ── */
.card {
  display: block; text-decoration: none; color: #fff;
  position: relative;
  width: 100%; max-width: 420px; min-height: 188px;
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.07), 0 22px 48px -20px rgba(0,0,0,0.85);
  padding: 28px 32px 26px;
  overflow: visible;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.4s ease, rotate 0.4s ease;
}
.card .card-bg {
  position: absolute; inset: 0; z-index: 0;
  border-radius: 18px; overflow: hidden;
  background-color: #3a3832;
  background-image: repeating-linear-gradient(135deg, rgba(120,110,90,0.12) 0 1px, transparent 1px 14px);
}
.card .card-bg img {
  display: block; width: 100%; height: 100%; object-fit: cover;
}
.card .card-overlay {
  position: absolute; inset: 0; z-index: 1;
  border-radius: 18px;
  background: linear-gradient(105deg, rgba(24,22,20,0.86) 0%, rgba(24,22,20,0.5) 42%, rgba(24,22,20,0.12) 100%);
}
.card-portfolio .card-overlay {
  background: linear-gradient(100deg, rgba(22,24,26,0.82) 0%, rgba(22,24,26,0.4) 46%, rgba(22,24,26,0.05) 100%);
}
.card-pizza .card-overlay {
  background: linear-gradient(105deg, rgba(20,16,12,0.84) 0%, rgba(20,16,12,0.46) 48%, rgba(20,16,12,0.1) 100%);
}
.card .card-content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: space-between; }
.card .clabel {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,0.5); display: flex; justify-content: space-between; align-items: center;
}
.card .clabel .kind { color: rgba(255,255,255,0.7); }
.card .ctitle {
  font-family: "Dancing Script", var(--hand), cursive;
  font-weight: 700; font-size: 44px; line-height: 0.9;
  margin-top: 24px; letter-spacing: 0.5px;
}
.card .cdesc { font-family: var(--serif); font-style: italic; font-size: 17px; color: rgba(255,255,255,0.7); margin-top: 10px; line-height: 1.3; max-width: 34ch; }
.card .cgo {
  margin-top: 14px;
  font-family: var(--hand); font-weight: 600; font-size: 26px; color: #fff;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
.card .cgo .arr { font-family: var(--mono); font-size: 20px; transition: transform 0.4s cubic-bezier(0.22,1,0.36,1); }
.card:hover { transform: translateY(-8px) scale(1.015); rotate: 0deg; box-shadow: 0 0 0 1px rgba(255,255,255,0.1), 0 36px 64px -24px rgba(0,0,0,0.9); }
.card:hover .cgo .arr { transform: translateX(8px); }

/* ── socials ── */
.socials { font-family: var(--hand); font-weight: 600; font-size: 26px; color: var(--ink-soft); display: flex; align-items: center; gap: 14px; }
.socials a { color: var(--ink-soft); text-decoration: none; transition: color 0.2s ease; white-space: nowrap; }
.socials a:hover { color: var(--accent); }
.socials .sep { color: var(--ink-faint); }

/* ── ink trail ── #trail lives in ../theme.css */

/* ─────────────────────────────────────────────────────────────────────────────
   Layout, base: fluid centered stack (phones up to small laptops)
   The cards wrap: one column when narrow, side-by-side once two fit.
   ───────────────────────────────────────────────────────────────────────────── */
.scaler { position: relative; z-index: 2; }
.stage {
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  max-width: 920px; margin: 0 auto; padding: 44px 20px 56px;
}
.hero { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.desk {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start;
  gap: 18px 24px; width: 100%;
}
.spot { display: flex; justify-content: center; flex: 1 1 340px; max-width: 420px; }

/* scrapbook tilt + stagger once the cards sit side-by-side.
   744px = 2 × 340px spot basis + 24px gap + 40px stage padding — keep in sync
   with the .spot flex values above. */
@media (min-width: 744px) {
  .card-portfolio { rotate: -2deg; }
  .card-pizza { rotate: 3deg; }
  .spot-pizza { margin-top: 26px; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Layout, desk: fixed 1320×820 artboard, scaled to fit by main.js
   Geometry is relational: hero flows top-down, cards sit in a row, each doodle
   anchors to its card's .spot wrapper.
   ───────────────────────────────────────────────────────────────────────────── */
@media (min-width: 1100px) {
  html, body { height: 100%; overflow: hidden; }

  .scaler { position: fixed; inset: 0; display: grid; place-items: center; }
  .stage {
    width: 1320px; height: 860px; max-width: none;
    margin: 0; padding: 0; gap: 0;
    transform-origin: center center; overflow: visible;
  }

  /* hero — flow spacing tuned to the original artboard */
  .hero { gap: 0; padding-top: 40px; }
  .hello { font-size: 34px; rotate: -4deg; }
  .name { font-size: 74px; margin-top: 26px; }
  .squiggle { margin-top: 6px; margin-bottom: 6px; }
  .tagline { font-size: 33px; margin-top: 5px; rotate: -1deg; }
  .bio { font-size: 23px; margin-top: 10px; white-space: nowrap; rotate: -0.3deg; }
  .find-me { font-size: 27px; margin-top: 27px; rotate: -4deg; }

  /* desk row — pizza card sits lower; right padding reserves room for the
     pizza-box doodle hanging off the row's end */
  .desk {
    flex-direction: row; flex-wrap: nowrap; align-items: flex-start; justify-content: center;
    gap: 50px; width: auto;
    margin-top: 77px; padding-right: 150px;
  }
  .spot { position: relative; display: block; flex: none; max-width: none; }
  .spot-pizza { margin-top: 78px; }

  .card-portfolio { width: 600px; height: 310px; max-width: none; rotate: -2deg; }
  .card-pizza { width: 420px; height: 260px; max-width: none; rotate: 3deg; }
  .card .ctitle { font-size: 68px; white-space: nowrap; }
  .card-pizza .ctitle { font-size: 52px; }

  /* decorations — each anchored to its card */
  .illo, .tape { display: block; }
  .spot-portfolio > .card { z-index: 1; }                  /* lamp tucks behind */
  .illo-lamp { left: 36px; top: -148px; z-index: 0; }      /* peeks over the card's top-left */
  .illo-pizza-box { left: calc(100% + 8px); top: -10px; }  /* just past the card's right edge */
  .illo-paperclip { right: 12px; top: -18px; rotate: -16deg; }             /* clipped to the card's top-right */
  /* tweak this tape here — position + rotate, add `scale: 1.2` to resize */
  .card-portfolio .tape { left: -24px; top: 0px; rotate: -26deg; }

  .socials { margin-top: auto; rotate: -1deg; }
}
