:root {
  color-scheme: light;
  --orange: #f15a24;
  --orange-deep: #d94718;
  --ink: #151617;
  --muted: #68696b;
  --paper: #f4f4f1;
  --white: #ffffff;
  --line: #d7d7d2;
  --dark: #111214;
  --max-width: 1180px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { max-width: 100%; overflow-x: clip; scroll-behavior: smooth; }
body { max-width: 100%; margin: 0; overflow-x: clip; background: var(--paper); color: var(--ink); }
img { max-width: 100%; }
a { color: inherit; }
button, a { font: inherit; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--white);
  color: var(--ink);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }

.site-header {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto;
  border-bottom: 1px solid rgba(255,255,255,.12);
  background: rgba(17,18,20,.66);
  color: #f7f7f4;
  box-shadow: 0 10px 34px rgba(0,0,0,.12);
  backdrop-filter: blur(30px) saturate(1.55);
  -webkit-backdrop-filter: blur(30px) saturate(1.55);
  transition: color .3s ease, background .3s ease, border-color .3s ease;
}
.site-header[data-light] {
  border-bottom-color: rgba(20,20,20,.1);
  background: rgba(247,247,244,.76);
  color: var(--ink);
}
.header-inner {
  width: min(calc(100% - 40px), var(--max-width));
  height: 64px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-name { display: inline-flex; align-items: center; gap: 11px; font-size: 14px; font-weight: 760; text-decoration: none; }
.site-mark { width: 12px; height: 12px; border: 3px solid currentColor; border-top-color: var(--orange); border-radius: 50%; transform: rotate(25deg); }
nav { display: flex; gap: 28px; }
nav a { color: inherit; font-size: 12px; text-decoration: none; opacity: .72; transition: opacity .2s ease; }
nav a:hover { opacity: 1; }

.hero {
  position: relative;
  isolation: isolate;
  min-height: max(720px, calc(100svh - 100px));
  overflow: hidden;
  background: var(--dark);
  color: #f7f7f4;
}
.hero-atmosphere {
  position: absolute;
  z-index: -3;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17,18,20,1) 0%, rgba(17,18,20,.96) 35%, rgba(17,18,20,.52) 70%, rgba(17,18,20,.72) 100%),
    url("assets/raidmate-home.webp") 87% 35% / 560px auto no-repeat;
  filter: saturate(1.2);
}
.hero-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 62%, var(--dark) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  mask-image: linear-gradient(90deg, black 0 30%, transparent 78%);
  -webkit-mask-image: linear-gradient(90deg, black 0 30%, transparent 78%);
}
.hero-inner {
  position: relative;
  z-index: 4;
  width: min(calc(100% - 48px), var(--max-width));
  min-height: max(720px, calc(100svh - 100px));
  margin-inline: auto;
  padding: 148px 0 104px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
.eyebrow { margin: 0 0 22px; color: var(--orange); font: 760 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.hero h1 { max-width: 720px; margin: 0; font-size: clamp(62px, 8.2vw, 110px); line-height: .92; letter-spacing: 0; }
.hero-intro { max-width: 510px; margin: 30px 0 0; color: #b9b9bb; font-size: 16px; line-height: 1.75; }
.hero-link, .project-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  color: inherit;
  font-size: 13px;
  font-weight: 720;
  text-decoration: none;
}
.hero-link { padding: 12px 17px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.08); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); }
.hero-link svg, .project-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; transition: transform .25s ease; }
.hero-link:hover svg { transform: translateY(3px); }
.hero-product { position: absolute; z-index: 1; top: 13%; right: max(-18px, calc((100vw - var(--max-width)) / 2 - 60px)); width: clamp(300px, 31vw, 450px); transform: rotate(5deg); transform-origin: center; will-change: transform; }
.hero-phone { overflow: hidden; border: 7px solid #070708; border-radius: 31px; background: #070708; box-shadow: 0 48px 110px rgba(0,0,0,.48); }
.hero-phone picture, .hero-phone img { display: block; width: 100%; height: auto; }
.floating-icon { position: absolute; right: -18px; bottom: 13%; width: 104px; height: 104px; border-radius: 22px; box-shadow: 0 25px 60px rgba(0,0,0,.44); transform: rotate(-5deg); }
.hero-footer { position: absolute; z-index: 4; right: 30px; bottom: 26px; left: 30px; display: flex; align-items: center; gap: 14px; color: #77787b; font: 700 9px ui-monospace, monospace; }
.hero-footer i { height: 1px; flex: 1; background: rgba(255,255,255,.12); }

.projects { width: min(calc(100% - 48px), var(--max-width)); margin-inline: auto; padding: 28px 0 130px; }
.section-heading { display: grid; grid-template-columns: 80px 1fr; gap: 28px; align-items: start; }
.section-index { margin: 2px 0 0; color: var(--orange-deep); font: 800 11px ui-monospace, monospace; }
.section-heading .eyebrow { margin-bottom: 13px; }
.section-heading h2 { margin: 0; font-size: clamp(40px, 5vw, 66px); line-height: 1; letter-spacing: 0; }
.project { display: grid; grid-template-columns: minmax(0, .92fr) minmax(330px, .7fr); gap: 100px; align-items: center; margin-top: 72px; padding-top: 72px; border-top: 1px solid var(--line); }
.project + .project { margin-top: 112px; }
.project-mafei { grid-template-columns: minmax(330px, .7fr) minmax(0, .92fr); }
.project-mafei .project-copy { grid-column: 2; grid-row: 1; }
.project-mafei .project-visual { grid-column: 1; grid-row: 1; }
.project-copy { max-width: 580px; }
.project-identity { display: flex; align-items: center; gap: 20px; }
.project-identity img { width: 78px; height: 78px; border-radius: 17px; box-shadow: 0 16px 34px rgba(24,24,24,.16); }
.project-type { margin: 0 0 5px; color: var(--muted); font: 720 9px ui-monospace, monospace; }
.project-identity h3 { margin: 0; font-size: 38px; line-height: 1; }
.project-lead { margin: 40px 0 0; font-size: clamp(30px, 3.6vw, 47px); font-weight: 760; line-height: 1.08; }
.project-description { max-width: 550px; margin: 23px 0 0; color: var(--muted); font-size: 15px; line-height: 1.78; }
.project-features { margin: 32px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.project-features li { display: flex; align-items: center; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.project-features span { color: var(--orange-deep); font: 800 9px ui-monospace, monospace; }
.project-link { color: var(--orange-deep); }
.project-link:hover svg { transform: translateX(4px); }
.trademark-note { max-width: 510px; margin: 28px 0 0; color: #92928f; font-size: 9px; line-height: 1.6; }
.project-visual { position: relative; isolation: isolate; width: min(100%, 360px); justify-self: center; }
.visual-glow { position: absolute; z-index: -1; inset: 12% -30% 8%; background: url("assets/raidmate-home.webp") center / cover; filter: blur(55px) saturate(1.8); opacity: .28; }
.visual-glow-mafei { background-image: url("assets/mafei-home.webp"); opacity: .22; }
.project-phone { overflow: hidden; border: 6px solid #141416; border-radius: 28px; background: #141416; box-shadow: 0 38px 80px rgba(26,26,27,.24); }
.project-phone-mafei { border-color: #0b1018; background: #0b1018; }
.project-phone picture, .project-phone img { display: block; width: 100%; height: auto; }
.visual-caption { display: flex; justify-content: space-between; margin: 13px 0 0; color: #7b7b79; font-size: 10px; }
.visual-caption span { color: var(--orange-deep); font: 720 9px ui-monospace, monospace; }

.continuation { background: var(--dark); color: #f5f5f2; }
.continuation-inner { width: min(calc(100% - 48px), var(--max-width)); min-height: 540px; margin-inline: auto; padding: 100px 0; display: flex; flex-direction: column; justify-content: center; }
.continuation h2 { max-width: 780px; margin: 0; font-size: clamp(47px, 6.7vw, 88px); line-height: .98; letter-spacing: 0; }
.continuation h2 + p { margin: 26px 0 0; color: #96969a; font-size: 14px; }
.site-footer { padding: 38px 0; background: #0b0c0d; color: #f2f2ef; border-top: 1px solid rgba(255,255,255,.09); }
.footer-inner { width: min(calc(100% - 48px), var(--max-width)); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.footer-inner strong { font-size: 14px; }
.footer-inner p { margin: 5px 0 0; color: #76777a; font-size: 10px; }
.footer-inner a { color: #9b9b9e; font-size: 11px; text-decoration: none; }
.footer-inner a:hover { color: white; text-decoration: underline; text-underline-offset: 4px; }

[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.75,.2,1); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
.hero [data-reveal]:nth-child(2) { transition-delay: .08s; }
.hero [data-reveal]:nth-child(3) { transition-delay: .16s; }
.hero [data-reveal]:nth-child(4) { transition-delay: .24s; }

@media (max-width: 900px) {
  .hero-product { right: -110px; width: 390px; opacity: .72; }
  .hero-atmosphere { background: linear-gradient(90deg, rgba(17,18,20,1), rgba(17,18,20,.83) 58%, rgba(17,18,20,.56)), url("assets/raidmate-home.webp") 100% center / 480px auto no-repeat; }
  .project { gap: 55px; }
}

@media (max-width: 700px) {
  .header-inner { width: calc(100% - 28px); height: 58px; }
  .site-name { font-size: 13px; }
  nav { gap: 16px; }
  nav a:first-child { display: none; }
  .hero { min-height: 760px; }
  .hero-inner { width: calc(100% - 32px); min-height: 760px; padding: 104px 0 80px; justify-content: flex-start; }
  .hero h1 { max-width: 360px; font-size: clamp(54px, 17vw, 72px); }
  .hero-intro { max-width: 330px; margin-top: 22px; font-size: 14px; }
  .hero-product { top: auto; right: -40px; bottom: -190px; width: 300px; transform: rotate(3deg); opacity: .78; }
  .floating-icon { right: auto; bottom: 44%; left: -42px; width: 72px; height: 72px; border-radius: 16px; }
  .hero-atmosphere { background: linear-gradient(180deg, var(--dark) 0 54%, rgba(17,18,20,.62) 76%, var(--dark)), url("assets/raidmate-home.webp") center 125% / 340px auto no-repeat; }
  .hero-atmosphere::after { display: none; }
  .hero-footer { right: 16px; bottom: 16px; left: 16px; }
  .projects { width: calc(100% - 32px); padding: 28px 0 92px; }
  .section-heading { grid-template-columns: 34px 1fr; gap: 12px; }
  .section-heading h2 { font-size: 40px; }
  .project { grid-template-columns: 1fr; gap: 64px; margin-top: 48px; padding-top: 48px; }
  .project + .project { margin-top: 88px; }
  .project-mafei .project-copy, .project-mafei .project-visual { grid-column: 1; grid-row: auto; }
  .project-identity img { width: 64px; height: 64px; border-radius: 14px; }
  .project-identity h3 { font-size: 32px; }
  .project-lead { margin-top: 32px; font-size: 34px; }
  .project-description { font-size: 14px; }
  .project-visual { width: min(82vw, 310px); }
  .continuation-inner { width: calc(100% - 32px); min-height: 450px; }
  .continuation h2 { font-size: 49px; }
  .footer-inner { width: calc(100% - 32px); align-items: flex-start; flex-direction: column; gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
