/* Raft home page layout. Components live in components.css, tokens in tokens.css. */

.page { min-height: 100vh; }
.section { padding-inline: var(--gutter); }

/* ---- Header (fixed; color follows whatever section is underneath) ---- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  color: var(--nav-fg, var(--color-ink)); transition: color 400ms ease;
  pointer-events: none;
}
.site-header.is-blend { mix-blend-mode: difference; transition: none; }
.site-header a, .site-header button, .site-header .nav-mobile { pointer-events: auto; }
.header-spacer { height: 110px; }
.nav-mobile { background: var(--bg); transition: background-color var(--ease-theme); }
.header {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  height: 110px; padding: 10px var(--gutter) 0;
}
.logo { --ls: 1; display: inline-flex; align-items: center; gap: 0; min-height: var(--tap); font-size: 0; line-height: 0; }  /* RAFT text is hidden; the wordmark is outlined artwork (Figma 8:1945) */
.logo::before, .logo::after { content: ""; flex: none; background: currentColor; -webkit-mask-repeat: no-repeat; -webkit-mask-position: center; -webkit-mask-size: contain; mask-repeat: no-repeat; mask-position: center; mask-size: contain; }
.logo::before { width: calc(49.714px * var(--ls)); height: calc(40px * var(--ls)); -webkit-mask-image: url(../images/logo-icon.svg); mask-image: url(../images/logo-icon.svg); }
.logo::after { margin-left: calc(24px * var(--ls)); width: calc(88.957px * var(--ls)); height: calc(15.844px * var(--ls)); -webkit-mask-image: url(../images/logo-wordmark.svg); mask-image: url(../images/logo-wordmark.svg); }
.nav-link { display: flex; align-items: center; min-height: var(--tap); font-size: var(--fs-nav); font-weight: 500; line-height: 2; letter-spacing: -.0467em; }
.nav-main {
  position: absolute; left: 58%; top: 38px; transform: translateX(-50%);
  display: none; width: max-content;
  column-gap: calc(clamp(24px, 12.5vw - 80px, 160px) + max(0px, 15.5172413793vw - 297.931034483px));
}
.nav-cta { display: none; }
/* Language switch (Figma 8:1944 / 31:30): two 24px circles, active one filled. Visible gap to "Let's talk" is 64px (47px + the 17px built into the 44px tap area). */
.header__end { display: none; align-items: center; gap: 51px; }
.lang-switch { display: flex; margin-right: -13px; }
.lang-switch__btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; font-size: 14px; line-height: 20px; letter-spacing: 0; }
.lang-switch__btn > span { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid color-mix(in srgb, currentColor 55%, transparent); border-radius: 50%; color: color-mix(in srgb, currentColor 60%, transparent); transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease; }
.lang-switch__btn:first-child > span { transform: translateX(5px); }
.lang-switch__btn:last-child > span { transform: translateX(-5px); }
.lang-switch__btn[lang="ja"] { font-family: 'Noto Sans JP', var(--font-sans); }
.lang-switch__btn.is-active > span { color: inherit; background: currentColor; border-color: transparent; }
.lang-switch__btn i { font-style: normal; }
.nav-mobile .lang-switch__btn.is-active > span > i { color: var(--color-night); }
.lang-switch__btn.is-active > span > i { font-style: normal; color: var(--bg, #fff); }
a.lang-switch__btn:hover > span, a.lang-switch__btn:focus-visible > span { color: currentColor; border-color: currentColor; }
.nav-mobile .lang-switch { margin: var(--space-8) 0 0 -24px; }
.nav-mobile .lang-switch__btn { width: 64px; height: 64px; font-size: 16px; }
.nav-mobile .lang-switch__btn > span { width: 36px; height: 36px; }
.nav-mobile .lang-switch__btn:first-child > span { transform: translateX(10px); }
.nav-mobile .lang-switch__btn:last-child > span { transform: translateX(-10px); }
.nav-mobile .lang-switch__btn:not(.is-active) > span { border-color: color-mix(in srgb, currentColor 80%, transparent); color: color-mix(in srgb, currentColor 90%, transparent); }
.menu-toggle { min-width: var(--tap); min-height: var(--tap); display: inline-flex; align-items: center; justify-content: flex-end; color: inherit; }
.menu-icon { position: relative; width: 28px; height: 12px; display: block; }
.menu-icon i { position: absolute; left: 0; right: 0; height: 2px; background: currentColor; transition: transform 300ms cubic-bezier(.65,0,.35,1), top 300ms cubic-bezier(.65,0,.35,1); }
.menu-icon i:first-child { top: 0; }
.menu-icon i:last-child { top: 10px; }
.menu-toggle[aria-expanded="true"] .menu-icon i:first-child { top: 5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon i:last-child { top: 5px; transform: rotate(-45deg); }
.nav-mobile { display: flex; flex-direction: column; gap: var(--space-2); padding: 0 var(--gutter) var(--space-6); }
.nav-mobile[hidden] { display: none; }
/* Full-screen menu sheet: black, white type, large links (mobile only) */
.nav-mobile {
  position: fixed; inset: 0; z-index: -1; height: 100vh; height: 100dvh;
  justify-content: center; gap: 0; padding: 110px var(--gutter) var(--space-8);
  background: var(--color-night); color: var(--color-night-ink);
  overflow-y: auto; transition: none;
}
.nav-mobile .nav-link {
  font-size: clamp(36px, 11.25vw, 57px); font-weight: 400; line-height: 1.02; letter-spacing: -.05em;
  min-height: 0; padding: .06em 0;
}
.nav-mobile .nav-link::after { display: none; }  /* no current-page underline in the sheet */
.site-header.is-menu-open, .site-header.is-menu-open.is-blend { color: var(--color-night-ink); mix-blend-mode: normal; transition: none; }
@media (min-width: 50rem) {
  .nav-main { display: flex; }
  .nav-cta { display: flex; }
  .header__end { display: flex; }
  .menu-toggle, .nav-mobile { display: none; }
}

/* ---- Hero ---- */
.hero {
  display: grid; gap: var(--space-10, 40px); align-items: end;
  grid-template-columns: minmax(0, 1fr);
  min-height: 470px; padding: 152px var(--gutter) 64px;
}
.hero__label { display: none; padding-bottom: var(--space-2); }
.hero__tagline { order: 2; margin-top: 0; max-width: 340px; font-size: var(--fs-body); line-height: 1.75; letter-spacing: -.02em; }
@media (min-width: 50rem) {
  .hero { grid-template-columns: minmax(0, calc(var(--projects-left, 639px) - var(--gutter) - 40px)) minmax(0, 1fr); min-height: 520px; padding-bottom: 80px; }
  .hero__label { display: flex; }
  .hero__text { grid-column: 2; grid-row: 1; order: 0; }
  .hero__tagline { order: 0; grid-column: 1; grid-row: 1; }
}
@media (min-width: 64rem) { .hero__tagline { font-size: var(--fs-body-lg); line-height: 1.4; } }

/* ---- Liquid reel ---- */
.reel { --reel-r: calc(var(--radius-media) * (1 - var(--reel-p, 0))); position: relative; aspect-ratio: 1.25 / 1; }  /* --reel-p (0 to 1) is set on scroll: margins and radius shrink to 0 */
@media (min-width: 50rem) { .reel { aspect-ratio: 2.12 / 1; } }
.reel__frame {
  position: absolute; inset: 0 calc(var(--gutter) * (1 - var(--reel-p, 0))); overflow: hidden; border-radius: var(--reel-r); clip-path: inset(0 round var(--reel-r)); isolation: isolate;
  background: var(--color-reel); color: var(--color-reel-ink);
}
.reel__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: var(--reel-r); }
.reel__launch { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; border-radius: var(--reel-r); }
.reel__bar { position: absolute; left: 20px; right: 20px; bottom: 20px; display: flex; align-items: center; justify-content: flex-end; pointer-events: none; }
.reel__bar .reel__pause, .reel__bar .reel__audio { pointer-events: auto; }
.reel__right { display: flex; align-items: center; gap: var(--space-4); }
.reel__audio { display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); }
.reel__audio .reel__audio-on { display: none; }
.reel__audio[aria-pressed='true'] .reel__audio-on { display: block; }
.reel__audio[aria-pressed='true'] .reel__audio-off { display: none; }
.reel__pause { font-size: 24px; }
@media (min-width: 50rem) { .reel__bar { left: 32px; right: 32px; bottom: 7px; } }

/* ---- About ---- */
.about { padding-top: 120px; padding-bottom: 160px; }
.about__giant { font-family: var(--font-sans); font-weight: 400; font-size: var(--fs-giant-about); line-height: .8; letter-spacing: -.0707em; padding-bottom: var(--space-8); }
.about__grid { display: grid; gap: var(--space-10, 40px); padding-top: var(--space-6); margin-top: var(--space-12); grid-template-columns: minmax(0, 1fr); }
.about__copy p + p { margin-top: var(--space-8); }
.about__more { margin-top: 36px; }
.about__intro { font-size: var(--fs-body-lg); line-height: 1.6; }
@media (min-width: 50rem) { .about__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } }

/* ---- Selected projects ---- */
.work { padding-block: 96px; }
@media (min-width: 50rem) { .work { padding-block: 144px; } }
.work__head p { padding-top: var(--space-2); }
.work__grid { display: grid; gap: 56px var(--space-8); align-items: start; padding-top: var(--space-16); grid-template-columns: minmax(0, 1fr); }
.work__grid .project-card--wide { grid-column: 1 / -1; }
@media (min-width: 50rem) { .work__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 80px; } }
.card-ratio-1 { aspect-ratio: 1.1 / 1; --media-bg: var(--color-mist); }
.card-ratio-2 { aspect-ratio: .95 / 1; --media-bg: var(--color-mist); }
.card-ratio-wide { aspect-ratio: 1.7 / 1; --media-bg: var(--color-legalon); }
.work__all { display: flex; justify-content: center; padding-top: var(--space-16); }
.work__note { padding-top: 144px; }
.work__note .split { padding-top: 40px; }
.work__note-copy { max-width: 672px; }
.work__note-copy .action { margin-top: 40px; }

/* ---- Clients + offerings ---- */
.offer { padding-top: 80px; padding-bottom: 144px; }
.clients { display: grid; gap: 36px var(--space-6); padding: 40px 0 80px; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-items: center; align-items: center; }
.client { display: flex; align-items: center; justify-content: center; width: 100%; }
.client img { display: block; width: calc(var(--w, 120px) * .85); max-width: 100%; height: auto; }
@media (min-width: 50rem) { .clients { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 48px var(--space-6); } .client img { width: var(--w, 120px); } }
@media (min-width: 64rem) { .clients { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0 var(--space-4); padding-bottom: 96px; } }
.offer__index { padding-top: var(--space-6); }
.offer__grid { display: grid; gap: 56px; padding-top: 56px; grid-template-columns: minmax(0, 1fr); }
.offer__copy p { margin-top: var(--space-8); max-width: 512px; line-height: 1.6; }
.offer__copy .action { margin-top: 40px; }
.accordion { display: flex; flex-direction: column; justify-content: flex-end; }
@media (min-width: 50rem) { .offer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 80px; } }

/* ---- Press ---- */
.press { padding-block: 96px; }
@media (min-width: 50rem) { .press { padding-block: 128px; } }
.press__head { padding-top: 28px; }
.press__head p { max-width: 208px; }
.press__arrows { display: flex; justify-content: flex-end; gap: var(--space-2); padding-top: var(--space-12); }
.press__arrow { display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); color: #fff; transition: opacity var(--ease-ui); }
.press__arrow:disabled { opacity: .3; cursor: default; }
.press__track { display: flex; gap: var(--space-8); margin-top: var(--space-4); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.press__track::-webkit-scrollbar { display: none; }
.press-slide { flex: 0 0 82%; scroll-snap-align: start; min-width: 0; }
@media (min-width: 50rem) { .press-slide { flex-basis: calc((100% - 2 * var(--space-8)) / 3); } }
.press-slide__link { display: block; }
.press-slide__img { display: block; border-radius: var(--radius-media); width: 100%; aspect-ratio: 1.15 / 1; object-fit: cover; background: var(--color-press-sand); }
.quote { margin-top: var(--space-24); padding-top: 36px; }
.quote blockquote { font-size: var(--fs-quote); line-height: 1.25; letter-spacing: 0; }
.quote figcaption { padding-top: var(--space-6); font-size: var(--fs-small); line-height: 1.625; color: var(--muted); }

/* ---- Footer ---- */
.footer { padding-top: var(--space-12); padding-bottom: 28px; }
.footer__cta { padding-block: 64px; }
@media (min-width: 50rem) { .footer__cta { padding-block: var(--space-24); } }
.footer__cta h2 { max-width: 1024px; padding-top: var(--space-8); }
.footer__actions { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--space-3); margin-top: 48px; padding-bottom: 36px; }
.footer__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); padding-top: var(--space-6); font-size: var(--fs-small); line-height: 1.14; }

/* ---- Showreel overlay (ported from the current site) ---- */
:root { --showreel-ease: cubic-bezier(.65, 0, .35, 1); }
.showreel-overlay { position: fixed; inset: 0; z-index: 500; background: #000; opacity: 0; pointer-events: none; transition: opacity .4s ease; }
.showreel-overlay.active { opacity: 1; pointer-events: auto; }
.showreel-overlay-morph { position: fixed; overflow: hidden; }
.showreel-overlay-frame { position: absolute; inset: 0; }
.showreel-overlay-frame iframe { width: 100%; height: 100%; display: block; border: 0; }
.showreel-close, .showreel-playpause, .showreel-mute {
  position: fixed; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.4); border: 0; border-radius: 999px; color: #fff; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity .3s ease, background .2s ease; z-index: 501;
}
.showreel-overlay.active .showreel-close, .showreel-overlay.active .showreel-playpause,
.showreel-overlay.active .showreel-mute, .showreel-overlay.active .showreel-progress { opacity: 1; pointer-events: auto; }
.showreel-close:hover, .showreel-playpause:hover, .showreel-mute:hover { background: rgba(0,0,0,.6); }
.showreel-close { top: 16px; right: 16px; width: 38px; height: 38px; }
.showreel-playpause, .showreel-mute { bottom: 24px; width: 42px; height: 42px; }
.showreel-playpause { left: 16px; }
.showreel-mute { right: 16px; }
.showreel-progress { position: fixed; left: 66px; right: 66px; bottom: 44px; height: 3px; background: rgba(255,255,255,.25); border-radius: 999px; cursor: pointer; z-index: 501; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.showreel-progress-bar { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--color-lime); border-radius: 999px; }
@media (min-width: 37.5rem) {
  .showreel-close { top: 28px; right: 28px; width: 44px; height: 44px; }
  .showreel-playpause, .showreel-mute { bottom: 40px; width: 48px; height: 48px; }
  .showreel-playpause { left: 28px; } .showreel-mute { right: 28px; }
  .showreel-progress { left: 92px; right: 92px; bottom: 62px; }
}

/* Top nav underline: 3px, wipes in left to right on hover/focus, stays on the current page */
.nav-link { position: relative; }
.nav-link::after {
  content: ''; position: absolute; left: 0; right: 0; top: calc(50% + .85em); height: 3px; background: currentColor;
  transform: scaleX(0); transform-origin: right center; transition: transform 350ms cubic-bezier(.65, 0, .35, 1);
}
.nav-link:hover::after, .nav-link:focus-visible::after, .nav-link[aria-current]::after { transform: scaleX(1); transform-origin: left center; }
@media (prefers-reduced-motion: reduce) { .nav-link::after { transition: none; } }

/* Desktop-only line breaks: let text reflow naturally on small screens */
@media (max-width: 49.99rem) { .br-d { display: none; } }

/* ---- Mobile vertical rhythm (tightened) ---- */
@media (max-width: 49.99rem) {
  /* header: logo 20% smaller, bar 20px shorter so logo and menu icon sit higher */
  .header { height: 80px; padding-top: 0; }
  .header-spacer { height: 80px; }
  .logo { --ls: .8; }  /* header and footer logos match */
  .nav-mobile { padding-top: 90px; }
  /* hero: 25% less space above the headline, tighter headline-to-subhead, video lands mid-screen */
  .hero { min-height: 0; padding-top: 116px; padding-bottom: 40px; gap: 16px; }
  /* 25% less space between main sections */
  .about { padding-top: 90px; padding-bottom: 120px; }
  /* space under the big "raft" word: 104px -> 78px (25% less) */
  .about__giant { padding-bottom: 24px; }
  .about__grid { margin-top: 36px; padding-top: 18px; }
  .work { padding-block: 72px; }
  .work__note { padding-top: 108px; }
  .offer { padding-top: 60px; padding-bottom: 108px; }
  .clients { padding-bottom: 72px; }
  .press { padding-block: 72px; }
  .quote { margin-top: 72px; }
  .footer__cta { padding-block: 48px; }
}

/* Hover cursor (Figma 31:47): over linked images the pointer becomes a 120px frosted-glass circle that grows from 0 */
.hover-cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .work .project-card__media, .work-card__media, .press-slide__img { cursor: none; }
  .hover-cursor { display: block; position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 400; pointer-events: none; will-change: transform; }
  .hover-cursor__disc {
    position: absolute; left: -60px; top: -60px; width: 120px; height: 120px; border-radius: 99px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(127, 127, 127, .3);
    -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
    color: #fff; font-family: var(--font-sans); font-weight: 500; font-size: 27px; line-height: 18px; letter-spacing: -1px; white-space: nowrap;
    transform: scale(0); transition: transform .4s cubic-bezier(.22, 1, .36, 1);
  }
  .hover-cursor.is-on .hover-cursor__disc { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) { .hover-cursor__disc { transition: none; } }
