/* =========================================
   STUDIO EASTWOOD — base CSS
========================================= */

/* --- Fonts --- */
@font-face {
  font-family: "Suisse Intl";
  src: url("./fonts/SuisseIntl-Thin.woff2") format("woff2");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Suisse Intl";
  src: url("./fonts/SuisseIntl-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Suisse Intl";
  src: url("./fonts/SuisseIntl-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Suisse Intl";
  src: url("./fonts/SuisseIntl-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- Reset --- */
* { box-sizing: border-box; }
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}
img { max-width: 100%; display: block; }

/* --- Variables --- */
:root {
  --pad: clamp(18px, 3vw, 40px);
  --gap: clamp(18px, 3vw, 32px);

  /* type sizes */
  --brandSize: clamp(64px, 10vw, 146px);
  --brandSizeMobile: clamp(48px, 14vw, 72px);
  --metaSize: 37px;
  --bodySize: 30px;

  /* hero image */
  --imgW: clamp(180px, 20vw, 340px);
  --radius: 10px;

  /* overlay (expanded hero) */
  --overlayOpacity: 0.22;  /* keep typography visible */
  --overlayBlur: 0px;      /* set to e.g. 4px if you want frosted */

  /* puls colors (USER SET) */
  --bg0: #213448;
  --bg1: #000000;
  --bg2: #001BB7;
  --bg3: #F96E5B;
  --bg4: #9E2A3A;

  /* text colors per background phase (USER SET) */
  --text0: #EAE0CF; /* on --bg0 */
  --text1: #9929EA; /* on --bg1 */
  --text2: #F5F1DC; /* on --bg2 */
  --text3: #FFE2AF; /* on --bg3 */
  --text4: #FF0000; /* on --bg4 */

  /* computed brand stack height (2 lines) */
  --brandLineHeight: 0.94; /* keep in sync with .brand line-height */
  --brandStackH: calc(var(--brandSize) * var(--brandLineHeight) * 2);
}

/* --- Body --- */
body {
  font-family: "Suisse Intl", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background-color: var(--bg0);
  color: var(--text0);
  animation: pulsate 25s linear infinite;
}

/* Hide system cursor only when JS confirms custom cursor is active */
body.cursor-enabled { cursor: none; }

/* --- Header --- */
.header {
  padding: var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--gap);
  align-items: start;
}
.header-left { min-width: 0; justify-self: start; }

/* --- Brand (logo block) --- */
.brand {
  margin: 0;
  font-weight: 700; /* Bold */
  letter-spacing: -0.02em;
  line-height: var(--brandLineHeight);
  text-transform: uppercase;
  font-size: var(--brandSize);

  /* shrink-wrap to the widest line (EASTWOOD©) */
  display: inline-block;
  width: max-content;
  max-width: 100%;
}

.brand-line {
  display: block;
  width: 100%;
}

.brand-line--studio {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: clamp(14px, 2.2vw, 28px);
  white-space: nowrap;
}

.brand-line--eastwood {
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
}

.brand-word { display: inline-block; }

.brand-rule {
  display: block;        /* allow grid column to fill */
  width: 100%;           /* fill the 1fr column */
  height: clamp(6px, 0.55vw, 10px);
  background: currentColor;
}

.brand-copyright {
  font-family: "Suisse Intl", system-ui, sans-serif;
  font-weight: 200; /* Thin */
  font-size: 1em;
  letter-spacing: -0.02em;
  opacity: 0.9;
  margin-left: 0.02em;
  vertical-align: baseline;
}

/* Make hero clickable without button styling */
.hero-trigger {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  line-height: inherit;
  display: inline-block;
}
.hero-trigger:focus { outline: none; }
.hero-trigger:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 6px;
}

/* --- Hero image --- */
.hero-image {
  margin: 0;
  width: var(--imgW);
  height: var(--brandStackH);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(0,0,0,0.08);
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* --- Intro --- */
.intro {
  display: grid;
  gap: 56px;
  padding-top: var(--pad);
  padding-left: var(--pad);
  padding-right: var(--pad);
  padding-bottom: calc(var(--pad) * 1.4);
}

/* --- Meta --- */
.meta {
  display: grid;
  grid-template-columns: 240px 240px 1fr;
  gap: var(--gap);
}
.meta-block h2 {
  margin: 0;
  font-weight: 600; /* Semibold */
  text-transform: uppercase;
  letter-spacing: -0.005em;
  line-height: 1.05;
  font-size: var(--metaSize);
}

/* --- Description --- */
.description p {
  margin: 0;
  max-width: 46ch;
  font-size: var(--bodySize);
  font-weight: 500; /* Medium */
  line-height: 1.3;
  opacity: 0.72;
}

/* --- Footer (desktop) --- */
.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 30px;
  padding-left: var(--pad);
  padding-right: var(--pad);
  padding-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 28px;
}
.footer a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  font-size: 28px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 28px;
  color: inherit;
}
.footer-link {
  display: inline-block;
  width: 240px;
}

/* Dot only — “thinking” halo pulse, always matches currentColor */
.status-dot {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: currentColor;
  flex: 0 0 auto;
}
.status-dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0;
  transform: scale(0.6);
  transform-origin: center;
  animation: availabilityPulse 2.2s ease-in-out infinite;
  pointer-events: none;
}

/* --- Custom cursor (dot) --- */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #ffffff;
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 9999;
  opacity: 1;
  will-change: transform;
  transform: translate(-100px, -100px) scale(0.5);
}

/* Cursor glyphs ( + / – / ← / → ) */
.cursor::after {
  content: "";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: "Suisse Intl", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 600;
  font-size: 20px; /* 2× so it appears same at cursor scale(0.5) */
  line-height: 1;
  color: #000;
  opacity: 0;
  transform: translateZ(0) translateY(-0.8px) translateX(0.2px) scale(0.7);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
  will-change: transform, opacity;
  mix-blend-mode: normal;
  text-align: center;
  letter-spacing: 0;
}

body.cursor-plus  .cursor::after { content: "+"; opacity: 1; transform: translateZ(0) translateY(-0.8px) translateX(0.2px) scale(1); }
body.cursor-minus .cursor::after { content: "–"; opacity: 1; transform: translateZ(0) translateY(-0.8px) translateX(0.2px) scale(1); }
body.cursor-left  .cursor::after { content: "←"; opacity: 1; transform: translateZ(0) translateY(-0.8px) translateX(0.2px) scale(1); }
body.cursor-right .cursor::after { content: "→"; opacity: 1; transform: translateZ(0) translateY(-0.8px) translateX(0.2px) scale(1); }

/* --- Expanded hero backdrop --- */
.image-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, var(--overlayOpacity));
  backdrop-filter: blur(var(--overlayBlur));
  -webkit-backdrop-filter: blur(var(--overlayBlur));
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
  z-index: 8000;
}

/* When hero is expanded (JS will toggle this class later) */
body.hero-expanded .image-backdrop {
  opacity: 1;
  pointer-events: auto;
}

/* Keep the image above the backdrop when expanded */
body.hero-expanded .hero-trigger {
  position: relative;
  z-index: 9000;
}

/* --- Responsive: stack header sooner --- */
@media (max-width: 1040px) {
  .header { grid-template-columns: 1fr; }
  .header-right { justify-self: start; }

  /* Mobile logo fills width between margins */
  .brand {
    width: 100%;
    font-size: var(--brandSizeMobile);
  }

  .brand-line { width: 100%; }

  .brand-line--studio {
    grid-template-columns: auto 1fr;
  }

  /* keep hero aligned */
  .hero-image {
    width: 100%;
    height: var(--brandStackH);
  }
}

/* --- Mobile --- */
@media (max-width: 860px) {
  .header { grid-template-columns: 1fr; }

  /* META -> 2 columns */
  .meta {
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
    row-gap: 12px;
    justify-items: start;
  }

  .meta-block { text-align: left; }

  /* FOOTER mobile: top row = Get In Touch + Available, email under */
  .footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 30px;
    padding-top: var(--pad);
    padding-left: var(--pad);
    padding-right: var(--pad);
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
    row-gap: 20px; /* larger gap before email */
    align-items: start;
    justify-items: start;
  }

  .footer-left { display: contents; }

  .footer-right {
    grid-column: 1 / -1;
    justify-self: start;
    text-align: left;
    margin-top: 6px;
  }

  /* Place Available For Work in column 2 to align with Based in / Amsterdam */
  .footer-left > .status { grid-column: 2; }

  .footer a,
  .status {
    font-size: 22px;
    line-height: 1.15;
  }
  .status { gap: 8px; }

  /* Hero image: double height on mobile */
  .hero-image { height: calc(var(--brandStackH) * 2); }
}

/* --- Intro animation helpers (Yuya-style) --- */
.reveal-mask {
  overflow: hidden;
  display: block;
}

/* Logo line-up: inner moves up within mask */
.logo-line {
  /*display: block;*/
  transform: translate3d(0, 110%, 0);
  opacity: 0;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Everything else: simple fade-up */
.reveal:not(.logo-line) {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  will-change: transform, opacity;
  backface-visibility: hidden;
}

/* --- Dot “thinking” pulse --- */
@keyframes availabilityPulse {
  0% { opacity: 0; transform: scale(0.6); }
  50% { opacity: 0.28; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.6); }
}

/* --- Pulsate animation (bg + text color) --- */
@keyframes pulsate {
  0%   { background-color: var(--bg0); color: var(--text0); }
  20%  { background-color: var(--bg1); color: var(--text1); }
  40%  { background-color: var(--bg2); color: var(--text2); }
  60%  { background-color: var(--bg3); color: var(--text3); }
  80%  { background-color: var(--bg4); color: var(--text4); }
  100% { background-color: var(--bg0); color: var(--text0); }
}