:root {
  --paper: #faf7f2;
  --paper-soft: #f3f0ea;
  --ink: #050505;
  --muted: #69645d;
  --hairline: #050505;
  --accent: #23d8bd;
  --accent-soft: #dff9f3;
  --nav-height: 64px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  appearance: none;
  border: 0;
  color: inherit;
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  color: var(--ink);
  background: var(--accent-soft);
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-height);
  background: color-mix(in srgb, var(--paper) 88%, white 12%);
  border-bottom: 1px solid var(--hairline);
  backdrop-filter: blur(16px);
}

.nav-inner {
  width: min(100%, 1440px);
  height: 100%;
  margin: 0 auto;
  padding: 0 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.wordmark span {
  transform: skewX(-7deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
  font-size: 16px;
  font-weight: 700;
}

.nav-links a {
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7px;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  width: 4px;
  height: 4px;
  margin: 0 3px;
  border-radius: 50%;
  background: var(--ink);
  display: inline-block;
}

.site-main {
  width: min(100%, 1440px);
  margin: 0 auto;
}

.hero-section {
  width: 100%;
}

.flip-shell {
  width: 100%;
  perspective: 1600px;
}

.flip-inner {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 760ms cubic-bezier(0.4, 0, 0.2, 1);
}

.flip-shell.is-flipped .flip-inner {
  transform: rotateX(180deg);
}

.flip-front,
.flip-back {
  width: 100%;
  backface-visibility: hidden;
}

.flip-front {
  position: relative;
}

.flip-back {
  position: absolute;
  inset: 0 auto auto 0;
  transform: rotateX(180deg);
}

.hero-title,
.back-content {
  position: relative;
  width: 100%;
  height: 600px;
  border: 1px solid var(--hairline);
  overflow: hidden;
}

.hero-title {
  cursor: crosshair;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
}

.hero-title::after,
.alt-layer::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at 50% 50%, rgba(250, 247, 242, 0.92), rgba(250, 247, 242, 0) 58%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
}

.pattern-row {
  display: flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  flex-shrink: 0;
  color: rgba(0, 0, 0, 0.055);
  font-size: 52px;
  font-weight: 800;
  line-height: 1.6;
  letter-spacing: 0.3em;
}

.pattern-row:nth-child(odd) {
  transform: translateX(-2em);
}

.pattern-row span {
  flex-shrink: 0;
  margin-right: 0.9em;
  transition: color 220ms ease, text-shadow 220ms ease;
}

.pattern-base .pattern-row span {
  pointer-events: auto;
}

.pattern-base .pattern-row span:hover {
  color: rgba(0, 0, 0, 0.14);
  text-shadow: 0 0 22px rgba(0, 0, 0, 0.1);
}

.hero-title h1,
.alt-layer h2 {
  position: relative;
  z-index: 3;
  margin: 0;
  text-align: center;
  font-size: 96px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.alt-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: white;
  clip-path: circle(0 at 50% 50%);
  will-change: clip-path;
  pointer-events: none;
}

.alt-layer::after {
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0) 56%);
}

.pattern-invert .pattern-row {
  color: rgba(255, 255, 255, 0.13);
  font-size: 34px;
}

.about-label {
  position: absolute;
  z-index: 4;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.about-trigger,
.back-close {
  position: absolute;
  z-index: 10;
  left: 0;
  width: 100%;
  height: 84px;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.about-trigger {
  bottom: 0;
}

.back-content {
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

.back-content::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.6;
}

.about-copy {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100% - 96px));
  margin: auto;
  padding: 40px 44px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.58);
}

.about-copy p {
  margin: 0;
  color: #312f2b;
  font-size: 18px;
  line-height: 2;
}

.about-copy p + p {
  margin-top: 18px;
}

.about-copy strong {
  color: var(--ink);
}

.back-close {
  bottom: 0;
}

.showcase {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-left: 1px solid var(--hairline);
  border-right: 1px solid var(--hairline);
}

.showcase-card {
  position: relative;
  min-height: 284px;
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
  background: var(--paper-soft);
}

.showcase-card + .showcase-card {
  border-left: 1px solid var(--hairline);
}

.showcase-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.65) contrast(0.95);
  transition: filter 420ms ease, transform 620ms ease;
}

.showcase-overlay {
  position: absolute;
  inset: 0;
  background: rgba(250, 247, 242, 0.34);
  transition: background 420ms ease;
}

.showcase-info {
  position: absolute;
  inset: 0 auto auto 0;
  width: min(420px, 100%);
  padding: 32px 36px;
}

.showcase-info strong,
.showcase-info small {
  display: block;
  transition: color 320ms ease;
}

.showcase-info strong {
  font-size: 28px;
  line-height: 1.25;
  font-weight: 800;
}

.showcase-info small {
  margin-top: 9px;
  color: rgba(0, 0, 0, 0.58);
  font-size: 14px;
}

.showcase-card:hover img,
.showcase-card:focus-visible img {
  filter: invert(1) brightness(0.88) saturate(0.6);
  transform: scale(1.035);
}

.showcase-card:hover .showcase-overlay,
.showcase-card:focus-visible .showcase-overlay {
  background: rgba(0, 0, 0, 0.68);
}

.showcase-card:hover .showcase-info strong,
.showcase-card:focus-visible .showcase-info strong {
  color: white;
}

.showcase-card:hover .showcase-info small,
.showcase-card:focus-visible .showcase-info small {
  color: rgba(255, 255, 255, 0.68);
}

.split-section,
.contact-section {
  border: 1px solid var(--hairline);
  border-top: 0;
  background: var(--paper);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1fr);
  gap: 80px;
  align-items: center;
  padding: 68px 80px;
  border-bottom: 1px solid var(--hairline);
}

.section-head h2,
.contact-section h2 {
  margin: 0;
  font-size: 64px;
  line-height: 1.05;
  font-weight: 850;
  letter-spacing: 0;
}

.section-head p,
.contact-section p {
  margin: 0;
  color: #2e2b28;
  font-size: 20px;
  line-height: 1.9;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
}

.row-list {
  width: 100%;
}

.list-row {
  display: grid;
  grid-template-columns: 120px 1fr 120px;
  min-height: 124px;
  border-bottom: 1px solid var(--hairline);
  background: var(--paper);
  transition: background 180ms ease, color 180ms ease;
}

.list-row:last-child {
  border-bottom: 0;
}

.row-index,
.row-arrow,
.row-copy {
  display: flex;
  align-items: center;
}

.row-index {
  justify-content: center;
  border-right: 1px solid var(--hairline);
  color: #918b82;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 24px;
  font-weight: 700;
}

.row-copy {
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 32px 48px;
}

.row-copy strong {
  font-size: 28px;
  line-height: 1.25;
  font-weight: 800;
}

.row-copy small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
  transition: color 180ms ease;
}

.row-arrow {
  justify-content: center;
  border-left: 1px solid var(--hairline);
  font-size: 34px;
  font-weight: 300;
}

.row-arrow {
  transition: transform 180ms ease;
}

.list-row:hover,
.list-row:focus-visible {
  color: white;
  background: var(--ink);
}

.list-row:hover .row-copy small,
.list-row:focus-visible .row-copy small {
  color: rgba(255, 255, 255, 0.68);
}

.list-row:hover .row-arrow,
.list-row:focus-visible .row-arrow {
  transform: translateX(8px);
}

.contact-section {
  display: flex;
  gap: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 68px 80px;
}

.contact-section div {
  max-width: 780px;
}

.contact-section p {
  margin-top: 18px;
}

.contact-link {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
}

.contact-link span {
  font-size: 28px;
  transition: transform 180ms ease;
}

.contact-link:hover span,
.contact-link:focus-visible span {
  transform: translateX(8px);
}

.site-footer {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 28px 64px;
  color: #69645d;
  border-left: 1px solid var(--hairline);
  border-right: 1px solid var(--hairline);
  font-size: 14px;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: hover) {
  .hero-section:has(.about-trigger:hover),
  .hero-section:has(.back-close:hover) {
    transform: perspective(1200px) rotateX(-2.5deg);
  }
}

@media (max-width: 1024px) {
  .nav-inner {
    padding: 0 40px;
  }

  .hero-title h1,
  .alt-layer h2 {
    font-size: 72px;
  }

  .section-head {
    gap: 48px;
    padding: 56px 48px;
  }

  .section-head h2,
  .contact-section h2 {
    font-size: 48px;
  }

  .list-row {
    grid-template-columns: 84px 1fr 84px;
  }

  .row-copy {
    padding: 30px 32px;
  }

  .row-copy strong {
    font-size: 24px;
  }

  .contact-section {
    padding: 56px 48px;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 56px;
  }

  .site-nav {
    height: var(--nav-height);
  }

  .nav-inner {
    padding: 0 32px;
  }

  .wordmark {
    font-size: 22px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: fixed;
    inset: var(--nav-height) 0 auto 0;
    display: grid;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--hairline);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-16px);
    transition: opacity 200ms ease, visibility 200ms ease, transform 260ms ease;
  }

  .nav-links a {
    min-height: 64px;
    padding: 0 32px;
    border-top: 1px solid var(--hairline);
  }

  .nav-links a::after {
    display: none;
  }

  body.nav-open .nav-links {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .hero-title,
  .back-content {
    height: 600px;
  }

  .pattern-row {
    font-size: 52px;
    line-height: 1.6;
  }

  .hero-title h1,
  .alt-layer h2 {
    font-size: 44px;
  }

  .about-copy {
    width: calc(100% - 48px);
    padding: 28px 30px;
  }

  .about-copy p {
    font-size: 15px;
    line-height: 1.9;
  }

  .showcase {
    grid-template-columns: 1fr;
  }

  .showcase-card {
    min-height: 210px;
  }

  .showcase-card + .showcase-card {
    border-left: 0;
    border-top: 1px solid var(--hairline);
  }

  .showcase-info {
    padding: 24px;
  }

  .showcase-info strong {
    font-size: 24px;
  }

  .section-head {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 44px 24px;
  }

  .section-head h2,
  .contact-section h2 {
    font-size: 40px;
  }

  .section-head p,
  .contact-section p {
    font-size: 16px;
  }

  .list-row {
    grid-template-columns: 60px 1fr 60px;
    min-height: 108px;
  }

  .row-index {
    font-size: 16px;
  }

  .row-copy {
    padding: 24px 20px;
  }

  .row-copy strong {
    font-size: 20px;
  }

  .row-copy small {
    font-size: 14px;
  }

  .row-arrow {
    font-size: 24px;
  }

  .contact-section {
    flex-direction: column;
    align-items: flex-start;
    padding: 44px 24px;
  }

  .contact-link {
    white-space: normal;
  }

  .site-footer {
    padding: 24px;
  }
}

@media (max-width: 430px) {
  .nav-inner {
    padding: 0 20px;
  }

  .hero-title,
  .back-content {
    height: 600px;
  }

  .hero-title h1,
  .alt-layer h2 {
    font-size: 36px;
  }

  .pattern-row {
    font-size: 48px;
  }

  .about-copy {
    width: calc(100% - 32px);
    padding: 20px;
  }

  .about-copy p {
    font-size: 14px;
    line-height: 1.82;
  }

  .showcase-card {
    min-height: 190px;
  }

  .section-head {
    padding: 36px 20px;
  }

  .section-head h2,
  .contact-section h2 {
    font-size: 32px;
  }

  .list-row {
    grid-template-columns: 50px 1fr 50px;
  }

  .row-copy {
    padding: 20px 16px;
  }

  .row-copy strong {
    font-size: 18px;
  }

  .row-copy small {
    font-size: 13px;
  }

  .contact-section {
    padding: 36px 20px;
  }
}

@media (max-width: 360px) {
  .hero-title h1,
  .alt-layer h2 {
    font-size: 32px;
  }

  .row-copy strong {
    font-size: 17px;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
