:root {
  --paper: #EEF0EA;
  --paper-2: #E3E7DE;
  --ink: #1B2420;
  --ink-soft: #4A5650;
  --line: #C6CCC1;
  --accent: #2F5D46;
  --accent-ink: #EEF0EA;
  --warm: #9A4E2A;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121815;
    --paper-2: #18201C;
    --ink: #E4E9E1;
    --ink-soft: #A3AEA6;
    --line: #2C3832;
    --accent: #7FB896;
    --accent-ink: #0F1512;
    --warm: #D9895F;
  }
}
:root[data-theme="dark"] {
  --paper: #121815; --paper-2: #18201C; --ink: #E4E9E1; --ink-soft: #A3AEA6;
  --line: #2C3832; --accent: #7FB896; --accent-ink: #0F1512; --warm: #D9895F;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--warm); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ---------- header ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 22px;
}
.logo {
  font-family: var(--mono); font-weight: 700; font-size: 1.15rem;
  text-decoration: none; letter-spacing: -0.02em;
}
.logo b { color: var(--accent); font-weight: 700; }
.logo span { font-family: var(--display); font-weight: 500; margin-left: 4px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 1rem/1 var(--display);
  padding: 14px 22px; border-radius: 999px;
  text-decoration: none; border: 1.5px solid var(--ink);
  transition: background .15s, color .15s, border-color .15s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-solid { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-solid:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.top .btn { padding: 10px 18px; font-size: .95rem; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(48px, 10vw, 120px) clamp(56px, 9vw, 110px); }
.hero-line {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: clamp(8px, 2vw, 28px);
}
.br {
  font-family: var(--mono); font-weight: 500;
  font-size: clamp(5rem, 17vw, 15rem);
  line-height: .8; color: var(--accent);
  user-select: none;
}
.hero h1 {
  font-weight: 800;
  font-size: clamp(2.1rem, 5.6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 15ch;
}
.hero-lede {
  margin-top: clamp(28px, 4vw, 44px);
  margin-left: clamp(0px, 9vw, 150px);
  max-width: 54ch;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: var(--ink-soft);
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 32px; margin-left: clamp(0px, 9vw, 150px);
}

@media (prefers-reduced-motion: no-preference) {
  .br-open  { animation: openL .9s cubic-bezier(.2,.8,.2,1) both; }
  .br-close { animation: openR .9s cubic-bezier(.2,.8,.2,1) both; }
  .hero h1  { animation: rise .9s .25s cubic-bezier(.2,.8,.2,1) both; }
  @keyframes openL { from { transform: translateX(40%); opacity: 0; } }
  @keyframes openR { from { transform: translateX(-40%); opacity: 0; } }
  @keyframes rise  { from { opacity: 0; transform: scale(.96); } }
}

/* ---------- services ---------- */
.services { border-top: 1.5px solid var(--ink); padding-block: clamp(56px, 8vw, 96px); }
.section-head {
  display: grid; grid-template-columns: 1fr; gap: 12px;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.section-head h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700;
  letter-spacing: -0.025em; line-height: 1.1; max-width: 22ch;
}
.section-head p { color: var(--ink-soft); max-width: 52ch; }

.svc-list { list-style: none; display: grid; grid-template-columns: 1fr; }
.svc {
  display: grid; grid-template-columns: 1fr; gap: 8px 40px;
  padding-block: 28px; border-top: 1px solid var(--line);
}
.svc:last-child { border-bottom: 1px solid var(--line); }
.svc h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.7rem); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.2;
  display: flex; gap: 12px; align-items: baseline;
}
.svc h3::before { content: "≫"; color: var(--accent); font-weight: 500; }
.svc .tag { color: var(--warm); font-weight: 500; margin-top: 2px; padding-left: 34px; }
.svc p { color: var(--ink-soft); max-width: 60ch; }
.svc .detail { font-size: .95rem; margin-top: 10px; }
.code { font-family: var(--mono); font-weight: 500; font-size: .92em; }

@media (min-width: 820px) {
  .section-head { grid-template-columns: 1fr 1fr; align-items: end; }
  .svc { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); padding-block: 36px; }
  .svc .tag { padding-left: 34px; }
}

/* ---------- contact ---------- */
.contact {
  background: var(--accent); color: var(--accent-ink);
  padding-block: clamp(64px, 9vw, 112px);
}
.contact h2 {
  font-size: clamp(2.2rem, 6vw, 4.8rem); font-weight: 800;
  letter-spacing: -0.035em; line-height: 1; max-width: 14ch;
}
.contact > .wrap > p { margin-top: 18px; max-width: 46ch; font-size: 1.15rem; opacity: .85; }
.channels {
  margin-top: clamp(36px, 5vw, 56px);
  display: grid; grid-template-columns: 1fr; gap: 0;
  border-top: 1.5px solid currentColor;
}
.channel {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px;
  padding-block: 22px; border-bottom: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  text-decoration: none;
}
.channel small { display: block; font-size: .95rem; opacity: .75; }
.channel strong {
  font-size: clamp(1.25rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.channel svg { width: 28px; height: 28px; transition: transform .2s; }
.channel:hover svg { transform: translate(4px, -4px); }
.channel:hover strong { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
@media (min-width: 820px) {
  .channels { grid-template-columns: 1fr 1fr; column-gap: 48px; }
}

/* ---------- footer ---------- */
footer {
  padding-block: 28px; font-size: .95rem; color: var(--ink-soft);
}
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.theme-toggle {
  background: none; border: 1px solid var(--line); color: var(--ink-soft);
  font: inherit; padding: 4px 12px; border-radius: 999px; cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink); }

@media (max-width: 560px) {
  .top .btn span { display: none; }
  .top .btn { padding: 10px 12px; }
  .hero-line { grid-template-columns: auto 1fr; }
  .br-close { display: none; }
  .br { font-size: 5.5rem; align-self: start; }
}
