:root {
  --bg: #f6f5f2;
  --ink: #111111;
  --mute: #6b6b6b;
  --line: #e4e2dc;
  --accent: #2f6bff;
  --font: "Instrument Sans", system-ui, sans-serif;
  --rail: 13.5rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -0.04em; line-height: 1.05; font-weight: 600; }
h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); max-width: 16ch; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.15rem; }
p { margin: 0; }
.skip {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: .5rem .9rem;
}
.skip:focus { top: 1rem; }

.rail {
  position: fixed; inset: 0 auto 0 0; width: var(--rail);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 1.75rem 1.4rem;
  border-right: 1px solid var(--line);
  background: rgba(246, 245, 242, 0.9);
  backdrop-filter: blur(12px);
  z-index: 40;
}
.logo {
  font-size: 1.35rem; font-weight: 700; letter-spacing: -0.04em;
}
.rail-nav { display: grid; gap: .55rem; }
.rail-nav a {
  font-size: .95rem; font-weight: 500; color: var(--mute);
  transition: color .2s, transform .2s var(--ease);
}
.rail-nav a:hover,
.rail-nav a.is-active { color: var(--ink); transform: translateX(3px); }
.rail-nav a.is-active { color: var(--accent); }
.rail-meta {
  font-size: .8rem; color: var(--mute); letter-spacing: .04em;
}

.menu-btn {
  display: none; position: fixed; top: 1rem; right: 1rem; z-index: 60;
  width: 2.6rem; height: 2.6rem; border: 1px solid var(--line);
  border-radius: 10px; background: rgba(246,245,242,.92); cursor: pointer;
}
.menu-btn span {
  display: block; width: 1rem; height: 1.5px; margin: .32rem auto; background: var(--ink);
  transition: transform .3s var(--ease);
}
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.3px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.3px) rotate(-45deg); }
.drawer {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  background: rgba(246,245,242,.97); backdrop-filter: blur(16px);
}
.drawer[hidden] { display: none; }
.drawer nav { display: grid; gap: 1.2rem; text-align: center; }
.drawer a { font-size: 2rem; font-weight: 600; letter-spacing: -0.04em; }

main {
  margin-left: var(--rail);
  padding: 0 clamp(1.5rem, 4vw, 3.5rem) 4rem;
}

.hero {
  min-height: 100svh;
  display: grid;
  align-content: end;
  gap: 2rem;
  padding: 6rem 0 3rem;
}
.brand {
  margin: 0; font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 700; letter-spacing: -0.06em; line-height: .9;
  animation: up .8s var(--ease) both;
}
.hero h1 { animation: up .8s var(--ease) .1s both; color: var(--mute); font-weight: 500; }
.hero-figure {
  margin: 1rem 0 0; overflow: hidden; border-radius: 18px;
  animation: up .9s var(--ease) .2s both;
}
.hero-figure img {
  aspect-ratio: 21/9; object-fit: cover;
  transform: scale(1.04); animation: zoom 14s var(--ease) forwards;
}

.block { padding: 5rem 0 1rem; border-top: 1px solid var(--line); }
.block header { display: grid; gap: .6rem; margin-bottom: 2rem; }
.label {
  margin: 0; font-size: .75rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
}

.work { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.work li {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.25rem; align-items: end;
  padding-bottom: 1.25rem; border-bottom: 1px solid var(--line);
}
.work img {
  aspect-ratio: 16/10; object-fit: cover; border-radius: 14px;
  transition: transform .5s var(--ease);
}
.work li:hover img { transform: scale(1.02); }
.work p { margin-top: .35rem; color: var(--mute); }

.method ol {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.method li {
  padding: 1.4rem; border: 1px solid var(--line); border-radius: 14px;
  background: #fff; font-weight: 600; letter-spacing: -0.02em;
}
.method span {
  display: block; margin-bottom: .8rem; color: var(--accent);
  font-size: .8rem; font-weight: 600; letter-spacing: .08em;
}

.contact { max-width: 32rem; }
.mail {
  display: inline-block; margin: 1rem 0 1.5rem;
  font-size: 1.25rem; font-weight: 600; color: var(--accent);
}
form { display: grid; gap: .7rem; }
input, textarea, button {
  width: 100%; padding: .9rem 1rem; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; color: var(--ink); font: inherit;
}
input:focus, textarea:focus { outline: 2px solid rgba(47,107,255,.35); border-color: transparent; }
button {
  background: var(--ink); color: #fff; font-weight: 600; cursor: pointer; border: 0;
  transition: transform .2s var(--ease);
}
button:hover { transform: translateY(-1px); }
.status { color: var(--accent); font-size: .95rem; }

footer {
  margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--line);
  color: var(--mute); font-size: .9rem;
}

@keyframes up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes zoom { to { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .brand, .hero h1, .hero-figure, .hero-figure img {
    animation: none !important; opacity: 1 !important; transform: none !important;
  }
}

@media (max-width: 900px) {
  .rail { display: none; }
  .menu-btn { display: block; }
  main { margin-left: 0; padding-top: 1rem; }
  .work li, .method ol { grid-template-columns: 1fr; }
  .hero-figure img { aspect-ratio: 16/10; }
}
