/* Home v2 (draft): new hero + one moving bento per project. Loaded by home-v2.html only. */

.v2-hero,
.v2-work {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-32);
  box-sizing: border-box;
  color: var(--color-white);
}

/* ---------- Hero ---------- */
.v2-hero {
  padding-top: 176px;
  padding-bottom: var(--space-96);
}

.v2-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8) var(--space-24);
  margin: 0 0 var(--space-32);
  font-family: var(--font-family-roboto);
  font-size: 15px;
  color: var(--color-grey-300);
}
.v2-eyebrow span + span::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 var(--space-24) 3px 0;
  border-radius: 50%;
  background: var(--color-lime-400);
}

.v2-title {
  margin: 0;
  font-family: var(--font-family-roslindale-display);
  font-weight: 400;
  font-size: clamp(56px, 9.2vw, 144px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.v2-accent { color: var(--color-lime-400); }

.v2-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-32) var(--space-64);
  align-items: end;
  margin-top: var(--space-48);
}
.v2-lead {
  max-width: 560px;
  margin: 0;
  font-family: var(--font-family-roboto);
  font-size: 18px;
  line-height: 1.6;
  color: var(--color-grey-300);
}
.v2-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-12) var(--space-24);
}
/* One button for the whole page: the hero's buttons and every project's "View case study".
   Outline: a grey-750 border that lightens to grey-300 on hover, no fill. Primary: lime. */
.v2-button,
.v2-cta {
  display: inline-flex;
  align-items: center;
  height: 52px;
  padding: 0 var(--space-24);
  border: 1px solid var(--color-grey-750);
  border-radius: var(--radius-12);
  font-family: var(--font-family-roboto);
  font-size: 16px;
  font-weight: 500;
  color: var(--color-white);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s;
}
.v2-button:hover,
.v2-project:hover .v2-cta,
.v2-project:focus-visible .v2-cta { border-color: var(--color-grey-300); }
.v2-button.is-primary {
  border-color: var(--color-lime-400);
  background: var(--color-lime-400);
  color: var(--color-grey-875);
}
.v2-button.is-primary:hover { background: var(--color-lime-600); border-color: var(--color-lime-600); }
/* The hero's two buttons at every width: My Resume (lime) + Explore My Work. Book a Call is in the nav. */

/* ---------- Work ---------- */
.v2-work {
  display: flex;
  flex-direction: column;
  gap: var(--space-120);
  padding-bottom: var(--space-120);
}

.v2-project {
  display: block;
  color: inherit;
  text-decoration: none;
}

.v2-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name cta";
  column-gap: var(--space-24);
  align-items: center;
  margin-top: var(--space-32); /* the title row sits under the tiles */
}
.v2-name {
  grid-area: name;
  margin: 0;
  font-family: var(--font-family-roslindale-display);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1;
}
.v2-year {
  grid-area: name;
  justify-self: end;
  display: none;
}
.v2-cta {
  grid-area: cta;
}
/* Hugeicons ArrowUpRight01 as a mask, so it takes the button's text colour (a "↗" character
   turned into a blue emoji box on iPhones) */
.v2-cta-icon {
  width: 18px;
  height: 18px;
  margin-left: var(--space-4);
  background-color: currentColor;
  -webkit-mask: url("/assets/icons/arrow-up-right-01.svg") center / contain no-repeat;
  mask: url("/assets/icons/arrow-up-right-01.svg") center / contain no-repeat;
}
.v2-project:focus-visible { outline: 2px solid var(--color-lime-400); outline-offset: 8px; border-radius: var(--radius-24); }

/* The bento: a tall tile on the left, two stacked pairs that split at different heights */
.v2-bento {
  display: grid;
  grid-template-columns: 1fr 1.45fr 1fr;
  grid-template-rows: repeat(8, 1fr);
  grid-template-areas:
    "a b c"
    "a b c"
    "a b c"
    "a b e"
    "a d e"
    "a d e"
    "a d e"
    "a d e";
  gap: var(--space-8);
  height: clamp(480px, 50vw, 680px);
  perspective: 1800px;
}
/* Each project's panel colour (what the tiles sit on) and the ink for UI pieces on it */
.v2-project { --panel: var(--color-grey-900); --ink: var(--color-white); }
.v2-project[data-theme="gourban"]         { --panel: color-mix(in srgb, var(--color-sky-650) 14%, var(--color-white)); --ink: var(--color-grey-875); }
.v2-project[data-theme="htec"]            { --panel: color-mix(in srgb, var(--color-blue-250) 30%, var(--color-white)); --ink: var(--color-grey-875); }
.v2-project[data-theme="gluware"]         { --panel: color-mix(in srgb, var(--color-sky-600) 12%, var(--color-white)); --ink: var(--color-grey-875); }
.v2-project[data-theme="vivant"]          { --panel: color-mix(in srgb, var(--color-red-800) 32%, var(--color-grey-975)); --ink: var(--color-white); }
.v2-project[data-theme="b2match"]         { --panel: color-mix(in srgb, var(--color-teal-300) 22%, var(--color-white)); --ink: var(--color-grey-875); }
.v2-project[data-theme="oroundo"]         { --panel: var(--color-grey-900); --ink: var(--color-white); }
.v2-project[data-theme="cultural-places"] { --panel: var(--color-yellow-100); --ink: var(--color-grey-875); }

.v2-tile {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-8);
  background: var(--panel);
  container-type: size;
  backface-visibility: hidden;
}
.v2-a { grid-area: a; }
.v2-b { grid-area: b; }
.v2-c { grid-area: c; }
.v2-d { grid-area: d; }
.v2-e { grid-area: e; }

/* A slide is one picture or UI piece. Tiles with several change them (data-fx, set by home-v2.js):
   y = slides up, x = slides sideways, flip = the whole tile turns like a card */
.v2-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  --hide: translateY(101%);
  --gone: translateY(-101%);
  transform: var(--hide);
  transition: transform 0.9s cubic-bezier(0.7, 0, 0.2, 1);
}
.v2-tile[data-fx="x"] .v2-slide { --hide: translateX(101%); --gone: translateX(-101%); }
.v2-tile[data-fx="flip"] .v2-slide { transform: none; opacity: 0; transition: none; }
.v2-tile[data-fx="flip"] .v2-slide[data-on] { opacity: 1; }
.v2-slide[data-on] { transform: none; }
.v2-slide[data-out] { transform: var(--gone); }
.v2-slide[data-reset] { transition: none; }
.v2-tile:not([data-fx]) .v2-slide { transform: none; }
.v2-tile:not([data-fx]) .v2-slide:not([data-on]) { visibility: hidden; }

/* photo: fills the tile */
.v2-slide.is-photo img { width: 100%; height: 100%; object-fit: cover; }
.v2-slide.is-photo.is-top { align-items: flex-start; }
.v2-slide.is-photo.is-top img { height: 152%; object-position: 58% 0; }
/* screen: the whole desktop screen, floating on the panel */
.v2-slide.is-screen { padding: 7% 7%; }
.v2-slide.is-screen img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 12px 32px -8px rgb(0 0 0 / 0.25);
}
/* phone: the whole phone screen */
.v2-slide.is-phone { padding: 8% 10%; }
.v2-slide.is-phone img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  border-radius: 7% / 3.6%;
  /* A drop-shadow, not a box-shadow: it follows the picture's own outline (a phone's bezel, a card's
     rounded corners), so no pale rectangle shows round a shape that's rounder than this radius */
  filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.08)) drop-shadow(0 12px 18px rgb(0 0 0 / 0.2));
}
/* ui: a small animated piece of the product, scaled to its tile (1em ≈ 15px on desktop) */
.v2-slide.is-ui {
  padding: 6%;
  color: var(--ink);
  font-family: var(--font-family-inter);
  font-size: clamp(9px, min(4.3cqw, 6cqh), 15px);
  line-height: 1.35;
}
/* the wide bottom tile has room to show its piece a little bigger */
.v2-d .v2-slide.is-ui { font-size: clamp(9px, min(3.4cqw, 5.2cqh), 17px); }
/* UI pieces only move while their bento is on screen, and never with Reduce motion */
.v2-bento:not(.is-live) .ui,
.v2-bento:not(.is-live) .ui *,
.v2-bento:not(.is-live) .ui *::before,
.v2-bento:not(.is-live) .ui *::after { animation-play-state: paused !important; }

/* ---------- Tablet ---------- */
@media screen and (max-width: 991px) {
  .v2-hero { padding-top: 144px; }
  .v2-intro { grid-template-columns: minmax(0, 1fr); align-items: start; }
}

/* ---------- Phone ---------- */
@media screen and (max-width: 767px) {
  .v2-hero, .v2-work { padding: 0 var(--space-16); }
  .v2-hero { padding-top: 120px; padding-bottom: var(--space-64); }
  .v2-eyebrow { gap: var(--space-4) var(--space-16); margin-bottom: var(--space-24); font-size: 14px; }
  .v2-eyebrow span + span::before { margin-right: var(--space-16); }
  .v2-title { font-size: clamp(44px, 13vw, 64px); }
  .v2-intro { margin-top: var(--space-32); gap: var(--space-24); }
  .v2-lead { font-size: 16px; }
  .v2-actions { gap: var(--space-12); }
  /* Two buttons side by side at equal width; they stack if both won't fit */
  .v2-actions .v2-button { flex: 1 1 0; min-width: max-content; justify-content: center; }

  .v2-work { gap: var(--space-80); padding-bottom: var(--space-80); }
  .v2-head { column-gap: var(--space-16); margin-top: var(--space-20); }
  /* On a phone "View case study" is an icon button beside the name; the words stay for screen readers */
  .v2-cta { width: 48px; height: 48px; padding: 0; justify-content: center; }
  .v2-cta-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .v2-cta-icon { width: 20px; height: 20px; margin-left: 0; }

  .v2-bento {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr 1.15fr;
    grid-template-areas:
      "a b"
      "a c"
      "d d";
    gap: var(--space-8);
    height: auto;
    aspect-ratio: 3 / 4.3;
  }
  .v2-e { display: none; }
  .v2-tile { border-radius: var(--radius-8); }
}

@media (prefers-reduced-motion: reduce) {
  .v2-slide { transition: none; }
  .ui, .ui *, .ui *::before, .ui *::after { animation: none !important; }
}
