:root {
  --paper: #ffffff;
  --ink: #0c0d0f;
  --muted: #64676d;
  --line: #d9dade;
  --soft: #f2f3f5;
  --accent: #155eef;
  --shell: min(1440px, calc(100% - 72px));
  --sans: Inter, "Helvetica Neue", Arial, "PingFang TC", "Noto Sans TC", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* V2 reverse rules live in DESIGN-RULES.md. Keep the page white, typographic,
   work-first, and restrained. Essential content must never depend on motion. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}
body.nav-open { overflow: hidden; }
img { display: block; width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { color: inherit; font: inherit; }
button, a, select { touch-action: manipulation; }
h1, h2, h3, p, figure, blockquote { margin-top: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 12px 16px;
  background: var(--ink);
  color: white;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
.section-shell { width: var(--shell); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: var(--shell);
  min-height: 92px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid transparent;
  background: transparent;
}
.site-header::before {
  position: absolute;
  inset: 0 50%;
  z-index: -1;
  width: 100vw;
  border-bottom: 1px solid transparent;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(12, 13, 15, 0.04);
  content: "";
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 240ms ease, border-color 240ms ease;
  backdrop-filter: blur(14px);
}
.site-header.is-scrolled {
  border-color: transparent;
}
.site-header.is-scrolled::before {
  border-color: var(--line);
  opacity: 1;
}
.brand { display: inline-flex; width: max-content; align-items: center; gap: 10px; font-size: 12px; font-weight: 750; }
.brand img { width: 72px; height: 34px; object-fit: contain; filter: brightness(0); }
.main-nav { display: flex; align-items: center; gap: 32px; font-size: 14px; }
.main-nav a, .header-cta, .text-link, .contact-mail { position: relative; }
.main-nav a::after, .header-cta::after, .text-link::after, .contact-mail::after {
  position: absolute;
  right: 0;
  bottom: -5px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 240ms var(--ease);
}
.main-nav a:hover::after, .header-cta:hover::after, .text-link:hover::after, .contact-mail:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.header-cta { justify-self: end; font-size: 14px; font-weight: 700; }
.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 12px 9px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.menu-toggle span { display: block; width: 100%; height: 1px; margin: 7px 0; background: var(--ink); transition: transform 220ms var(--ease); }

.eyebrow, .section-index {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - 92px);
  padding: 90px 0 64px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.hero::before {
  position: absolute;
  top: -92px;
  left: 50%;
  z-index: -1;
  width: 100vw;
  height: calc(100% + 92px);
  background: var(--paper) url("./assets/design/home-hero-background-v2.webp?v=20260813") center center / cover no-repeat;
  content: "";
  transform: translateX(-50%);
}
.hero-copy { max-width: 780px; }
.hero-copy .eyebrow { margin-bottom: 24px; }
.hero h1 {
  max-width: 780px;
  margin-bottom: 0;
  font-size: 84px;
  font-weight: 780;
  line-height: 0.93;
}
.hero-intro { max-width: 430px; margin-top: 64px; }
.hero-intro p { margin-bottom: 28px; color: var(--muted); }
.text-link { display: inline-flex; min-height: 44px; align-items: center; gap: 12px; font-size: 15px; font-weight: 700; }

.statement {
  padding: 170px 0;
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 32px;
  border-bottom: 1px solid var(--line);
}
.statement-content h2 {
  max-width: 1120px;
  margin-bottom: 34px;
  font-size: 72px;
  font-weight: 650;
  line-height: 1.02;
}
.statement-content > p { max-width: 700px; margin-bottom: 0; color: var(--muted); font-size: 21px; }

.work, .services, .tech, .proof { padding: 150px 0; border-bottom: 1px solid var(--line); }
.section-heading {
  margin-bottom: 80px;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 32px;
  align-items: end;
}
.section-heading .section-index { align-self: start; }
.section-heading h2 { margin-bottom: 0; font-size: 64px; font-weight: 680; line-height: 1; }
.section-heading > p:last-child { max-width: 360px; margin: 0 0 6px; color: var(--muted); }

.project-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 104px 24px; }
.project-wide { grid-column: 1 / -1; }
.project-media { overflow: hidden; background: var(--soft); }
.project-media-wide { aspect-ratio: 2400 / 760; }
.project-media-showcase { aspect-ratio: 1602 / 982; }
.project-media-nexora { background: #031928; }
.project-media-page { aspect-ratio: 4 / 3; }
.project-media img { height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.project-media-page img { object-position: top center; }
.project-media-nexora img { height: auto; object-fit: contain; object-position: top center; }
.project a:hover .project-media img { transform: scale(1.018); }
.project a:hover .project-media-nexora img { transform: none; }
.project-meta {
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--ink);
}
.project-meta div { display: flex; align-items: baseline; gap: 22px; }
.project-meta span { color: var(--muted); font-size: 12px; }
.project-meta h3 { margin: 0; font-size: 18px; font-weight: 700; }
.project-meta p { margin: 0; color: var(--muted); font-size: 14px; text-align: right; }

.services .section-heading { grid-template-columns: 1fr 2fr 1fr; }
.service-rows { border-top: 1px solid var(--ink); }
.service-row {
  min-height: 150px;
  padding: 30px 0;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 32px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.service-row > span { color: var(--muted); font-size: 12px; }
.service-row h3 { margin: 0; font-size: 42px; font-weight: 620; }
.service-row p { margin: 0; color: var(--muted); }

.use-cases {
  min-height: 100svh;
  padding: 150px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  border-bottom: 1px solid var(--line);
}
.use-cases-copy h2 { max-width: 650px; margin-bottom: 28px; font-size: 64px; font-weight: 680; line-height: 1; }
.use-cases-subtitle {
  max-width: 560px;
  margin-bottom: 72px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  scroll-margin-top: 120px;
}
.use-case-list { border-top: 1px solid var(--ink); }
.use-case-list article {
  padding: 34px 0 38px;
  border-bottom: 1px solid var(--line);
}
.use-case-list { margin-top: 58px; }
.use-case-heading { display: grid; grid-template-columns: 0.62fr 1.38fr; gap: 18px; align-items: baseline; }
.use-case-heading span { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.use-case-heading h3 { margin: 0; font-size: 25px; font-weight: 650; line-height: 1.15; }
.use-case-flow {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1.2fr);
  gap: 18px;
  align-items: start;
}
.use-case-flow p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.use-case-flow div:last-child p { color: var(--ink); }
.case-arrow { padding-top: 1px; color: var(--muted); text-align: center; }
.use-cases-media { position: sticky; top: 124px; margin-bottom: 0; }
.use-cases-media img { min-height: 700px; object-fit: cover; }

.tech { display: grid; grid-template-columns: 1fr 2fr; gap: 72px; }
.tech-intro { position: sticky; top: 124px; align-self: start; }
.tech-intro h2 { max-width: 620px; margin-bottom: 42px; font-size: 64px; font-weight: 680; line-height: 1; }
.tech-list { border-top: 1px solid var(--ink); }
.tech-list article {
  min-height: 210px;
  padding: 28px 0;
  display: grid;
  grid-template-columns: 72px 1fr;
  align-content: start;
  border-bottom: 1px solid var(--line);
}
.tech-list span { color: var(--muted); font-size: 12px; }
.tech-list h3 { margin: 46px 0 12px; grid-column: 2; font-size: 38px; font-weight: 620; }
.tech-list p { max-width: 580px; margin: 0; grid-column: 2; color: var(--muted); }

.process {
  min-height: 100svh;
  padding: 150px 0;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 80px;
  align-items: start;
  border-bottom: 1px solid var(--line);
}
.process-copy h2 { max-width: 720px; margin-bottom: 72px; font-size: 64px; font-weight: 680; line-height: 1; }
.process-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.process-list li { min-height: 112px; padding: 24px 0; display: grid; grid-template-columns: 72px 1fr; border-bottom: 1px solid var(--line); }
.process-list li > span { color: var(--muted); font-size: 12px; }
.process-list h3 { margin: 0 0 8px; font-size: 22px; }
.process-list p { margin: 0; color: var(--muted); }
.process-media { position: sticky; top: 124px; margin-bottom: 0; }
.process-media img { min-height: 760px; object-fit: cover; }

.proof .section-heading { grid-template-columns: 1fr 3fr; }
.proof .section-heading h2 { max-width: 980px; }
.proof-list { border-top: 1px solid var(--ink); }
.proof-list blockquote {
  min-height: 180px;
  margin: 0;
  padding: 32px 0;
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 32px;
  align-items: start;
  border-bottom: 1px solid var(--line);
}
.proof-list span { color: var(--muted); font-size: 12px; }
.proof-list p { max-width: 980px; margin: 0; font-size: 36px; font-weight: 560; line-height: 1.22; }

.contact { min-height: 100svh; padding: 150px 0 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-content: space-between; }
.contact-copy h2 { max-width: 720px; margin-bottom: 36px; font-size: 72px; font-weight: 680; line-height: 0.98; }
.contact-copy > p:not(.section-index) { max-width: 610px; color: var(--muted); }
.contact-mail { display: inline-flex; min-height: 48px; margin-top: 24px; align-items: center; gap: 20px; font-weight: 700; }
.contact-form { border-top: 1px solid var(--ink); }
.field-row { display: grid; grid-template-columns: 160px 1fr; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.field-row label { padding-top: 12px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.field-row input, .field-row select, .field-row textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
}
.field-row textarea { resize: vertical; }
.field-row input::placeholder, .field-row textarea::placeholder { color: #999ca2; opacity: 1; }
.field-row:focus-within { border-color: var(--accent); }
.contact-form button {
  width: 100%;
  min-height: 64px;
  margin-top: 28px;
  padding: 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease;
}
.contact-form button:hover { color: var(--accent); border-color: var(--accent); }
.form-note { margin-top: 14px; color: var(--muted); font-size: 12px; }
.site-footer { grid-column: 1 / -1; padding-top: 22px; display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; text-transform: uppercase; }
.site-footer p { margin: 0; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 520ms ease, transform 520ms var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1200px) {
  :root { --shell: min(1120px, calc(100% - 48px)); }
  .hero h1 { font-size: 72px; }
  .statement-content h2, .contact-copy h2 { font-size: 62px; }
  .section-heading h2, .use-cases-copy h2, .tech-intro h2, .process-copy h2 { font-size: 54px; }
  .use-cases { gap: 48px; }
  .use-case-heading { grid-template-columns: 0.55fr 1.45fr; }
  .use-case-flow { grid-template-columns: 1fr 24px 1fr; gap: 12px; }
}

@media (max-width: 900px) {
  :root { --shell: calc(100% - 40px); }
  html { scroll-padding-top: 76px; }
  .site-header { min-height: 76px; grid-template-columns: 1fr auto auto; gap: 12px; }
  .brand img { width: 60px; }
  .header-cta { margin-right: 4px; }
  .menu-toggle { display: block; }
  .main-nav {
    position: fixed;
    inset: 76px 0 auto;
    min-height: calc(100svh - 76px);
    padding: 64px 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    background: var(--paper);
    font-size: 42px;
    font-weight: 650;
    transform: translateX(100%);
    transition: transform 280ms var(--ease);
  }
  .main-nav.is-open { transform: translateX(0); }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .hero { min-height: calc(100svh - 76px); padding: 64px 0 52px; }
  .hero::before { top: -76px; height: calc(100% + 76px); background-position: 62% center; }
  .hero-copy { max-width: 640px; }
  .hero-copy .eyebrow { margin-bottom: 24px; }
  .hero h1 { font-size: 60px; }
  .hero-intro { max-width: 480px; margin-top: 44px; }
  .statement { padding: 120px 0; grid-template-columns: 1fr; gap: 16px; }
  .statement-content h2 { font-size: 52px; }
  .work, .services, .tech, .proof { padding: 110px 0; }
  .section-heading, .services .section-heading { grid-template-columns: 1fr; gap: 16px; margin-bottom: 60px; }
  .section-heading h2 { font-size: 52px; }
  .section-heading > p:last-child { max-width: 620px; }
  .service-row { grid-template-columns: 56px 1fr; }
  .service-row p { grid-column: 2; }
  .use-cases, .process { min-height: auto; padding: 110px 0; grid-template-columns: 1fr; gap: 64px; }
  .use-cases-copy h2, .process-copy h2 { font-size: 52px; }
  .use-cases-media, .process-media, .tech-intro { position: static; }
  .use-cases-media img, .process-media img { min-height: 0; }
  .tech { grid-template-columns: 1fr; }
  .tech-intro h2 { font-size: 52px; }
  .proof .section-heading { grid-template-columns: 1fr; }
  .proof-list blockquote { grid-template-columns: 56px 1fr; }
  .proof-list p { font-size: 30px; }
  .contact { padding-top: 110px; grid-template-columns: 1fr; gap: 72px; }
  .contact-copy h2 { font-size: 56px; }
}

@media (max-width: 620px) {
  :root { --shell: calc(100% - 28px); }
  body { font-size: 16px; }
  .site-header { width: 100%; padding-inline: 14px; }
  .brand span { display: none; }
  .header-cta { font-size: 13px; }
  .hero { min-height: calc(100svh - 76px); padding: 44px 0 38px; }
  .hero::before {
    background-position: right bottom;
    background-size: auto 48%;
  }
  .hero-copy { max-width: 100%; }
  .hero h1 { font-size: 40px; line-height: 0.98; }
  .hero-intro { max-width: 100%; margin-top: 28px; }
  .hero-intro p { max-width: 420px; margin-bottom: 18px; }
  .statement { padding: 96px 0; }
  .statement-content h2 { font-size: 40px; }
  .statement-content > p { font-size: 18px; }
  .work, .services, .tech, .proof { padding: 88px 0; }
  .section-heading h2, .use-cases-copy h2, .tech-intro h2, .process-copy h2 { font-size: 40px; }
  .project-list { grid-template-columns: 1fr; gap: 72px; }
  .project-wide { grid-column: auto; }
  .project-media-wide, .project-media-page { aspect-ratio: 4 / 3; }
  .project-media-showcase { aspect-ratio: 1602 / 982; }
  .project-media-wide img { object-position: left center; }
  .project-meta { display: block; }
  .project-meta p { margin-top: 8px; text-align: left; }
  .service-row { min-height: 134px; padding-block: 24px; }
  .service-row h3 { font-size: 28px; }
  .use-cases, .process { padding: 88px 0; }
  .use-cases-copy h2, .process-copy h2 { margin-bottom: 52px; }
  .use-case-heading { grid-template-columns: 1fr; gap: 8px; }
  .use-case-heading h3 { font-size: 23px; }
  .use-case-flow { grid-template-columns: 1fr; gap: 14px; }
  .case-arrow { padding: 0; text-align: left; transform: rotate(90deg); transform-origin: left center; }
  .tech-list article { min-height: 190px; }
  .tech-list h3 { font-size: 28px; }
  .proof-list blockquote { min-height: 160px; grid-template-columns: 32px 1fr; gap: 16px; }
  .proof-list p { font-size: 24px; }
  .contact { min-height: auto; padding-top: 88px; }
  .contact-copy h2 { font-size: 44px; }
  .field-row { grid-template-columns: 1fr; gap: 2px; }
  .field-row label { padding-top: 0; }
  .site-footer { flex-direction: column; }
}

@media (max-width: 420px) {
  .site-header { gap: 8px; }
  .brand img { width: 52px; }
  .header-cta { margin-right: 0; font-size: 12px; }
  .menu-toggle { width: 40px; height: 40px; }
}

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