/* Ribbit Lab
   Type: Bricolage Grotesque (Latin display) + Zen Kaku Gothic New (Japanese, body).
   Color: white paper, deep green ink, one frog-green accent. The product mockups in the hero are the one bold element. */

:root {
  --bg: #ffffff;
  --bg-soft: #f3f7f3;
  --ink: #14211a;
  --ink-2: #3b4a41;
  --muted: #67776d;
  --line: #dde5de;
  --frog: #1d7a46;
  --frog-hover: #15633a;
  --on-frog: #ffffff;
  --lily: #dcefd3;
  --deep: #14472b;
  --sun: #f1cf6b;
  --line-strong: #bfcdc2;
  --display: "Bricolage Grotesque", "Zen Kaku Gothic New", "Hiragino Sans", sans-serif;
  --text: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1813;
    --bg-soft: #142019;
    --ink: #e6eee8;
    --ink-2: #c2cec6;
    --muted: #8d9f94;
    --line: #25342b;
    --frog: #6fcf94;
    --frog-hover: #8ddcab;
    --on-frog: #0f1813;
    --lily: #1d3326;
    --deep: #2c6b47;
    --sun: #d9b552;
    --line-strong: #34473b;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.85;
  font-feature-settings: "palt" 0;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: var(--frog); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--frog-hover); }
:focus-visible { outline: 2px solid var(--frog); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0; font-weight: 700; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--bg); padding: 6px 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  background: var(--frog); color: var(--on-frog);
  font: 700 15px/1 var(--text); text-decoration: none; border: 1.5px solid var(--frog);
  cursor: pointer; transition: background-color .15s, border-color .15s;
}
.btn:hover { background: var(--frog-hover); border-color: var(--frog-hover); color: var(--on-frog); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-soft); border-color: var(--muted); color: var(--ink); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 14px; }

/* Header */
header.site {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; gap: 32px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 18px/1 var(--display); letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.brand .mark { width: 32px; height: 24px; color: var(--frog); }
.nav { display: flex; gap: 26px; font-size: 14.5px; margin-right: auto; }
.nav a { color: var(--ink-2); text-decoration: none; }
.nav a:hover { color: var(--ink); }
.bar-end { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.lang { font-size: 14px; color: var(--ink-2); text-decoration: none; }
.lang:hover { color: var(--ink); text-decoration: underline; }

/* Hero */
.hero { padding: 72px 0 88px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(30px, 3.9vw, 42px); line-height: 1.28; letter-spacing: -.01em; font-weight: 700; }
html[lang="en"] .hero h1 { font-size: clamp(38px, 5.2vw, 62px); line-height: 1.08; letter-spacing: -.025em; font-weight: 800; }
.lede { margin-top: 24px; font-size: 17px; color: var(--ink-2); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

h1 .nb { white-space: nowrap; }

/* Hero illustration: flat shapes, colors follow the theme */
.art { position: relative; }
.art svg { width: 100%; height: auto; max-height: 480px; }
.a-pond { fill: var(--lily); }
.a-deep { fill: var(--deep); }
.a-frog { fill: var(--frog); }
.a-paper { fill: var(--bg); }
.a-sun { fill: var(--sun); }
.a-dot { fill: var(--line-strong); }
.a-line { fill: none; stroke: var(--frog); stroke-width: 3; stroke-linecap: round; }
.a-line-c { fill: none; stroke: var(--deep); stroke-width: 3; }

/* Sections */
.block { padding: 96px 0; }
.block.soft { background: var(--bg-soft); }
.block-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px; align-items: end; margin-bottom: 44px; }
.block-head h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.2; letter-spacing: -.015em; }
.block-head p { color: var(--ink-2); max-width: 36em; }

/* Services: a ruled list, not cards */
.services { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.services li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 200px; gap: 32px; padding: 28px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.services h3 { font-size: 20px; letter-spacing: -.01em; }
.services p { color: var(--ink-2); }
.tag { justify-self: end; font-size: 13px; color: var(--muted); white-space: nowrap; }

/* Works */
.work-group + .work-group { margin-top: 56px; }
.work-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.work-group-head h3 { font-size: 20px; font-family: var(--text); }
.work-group-head p { color: var(--muted); font-size: 14px; }
.works { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.works li { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 26px 24px 22px; display: flex; flex-direction: column; gap: 8px; }
.works .kind { font-size: 13px; color: var(--frog); font-weight: 700; }
.works h4 { margin: 0; font-size: 19px; line-height: 1.45; font-family: var(--text); font-weight: 700; }
.works p { color: var(--ink-2); font-size: 15px; }
.works .stack { margin-top: auto; padding-top: 14px; font-size: 13px; color: var(--muted); }

/* Process: this one really is a sequence, so it gets numbers */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: step; }
.steps li { counter-increment: step; padding: 0 28px 0 0; position: relative; }
.steps li::before {
  content: counter(step); display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--lily); color: var(--frog); font: 700 16px/1 var(--display);
  margin-bottom: 18px; position: relative; z-index: 1;
}
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 20px; left: 40px; right: 0; border-top: 1.5px dashed var(--line); }
.steps h3 { font-size: 17px; font-family: var(--text); margin-bottom: 6px; }
.steps p { color: var(--ink-2); font-size: 15px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 64px; align-items: start; }
.contact-text h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.2; letter-spacing: -.015em; margin-bottom: 16px; }
.contact-text p { color: var(--ink-2); }
.contact-mail { margin-top: 28px !important; display: flex; flex-direction: column; gap: 2px; }
.contact-mail span { font-size: 13px; color: var(--muted); }
.contact-mail a { font: 700 20px/1.4 var(--display); word-break: break-all; }
.form { background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 32px; display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 14px; font-weight: 700; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-left: 4px; }
.field small { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
input, select, textarea {
  font: 400 16px/1.5 var(--text); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; width: 100%;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--frog); box-shadow: 0 0 0 3px color-mix(in srgb, var(--frog) 22%, transparent); }
textarea { resize: vertical; min-height: 140px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--frog); }
.form .btn { justify-self: start; min-width: 160px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Company */
.company { margin: 0; border-top: 1px solid var(--ink); max-width: 860px; }
.company div { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.company dt { color: var(--muted); font-size: 15px; }
.company dd { margin: 0; }

/* Simple pages (privacy, thanks, error) */
.page { padding: 64px 0 96px; }
.page h1 { font-size: clamp(28px, 4vw, 38px); line-height: 1.3; margin-bottom: 12px; }
.page h2 { font-size: 20px; margin: 44px 0 10px; font-family: var(--text); }
.page h3 { font-size: 16.5px; margin: 24px 0 4px; font-family: var(--text); }
.page p { margin-bottom: 14px; color: var(--ink-2); }
.page ul { padding-left: 1.3em; color: var(--ink-2); }
.page .meta { color: var(--muted); font-size: 14px; }
.page .btn { margin: 8px 8px 0 0; }
dl.plain { display: grid; grid-template-columns: max-content 1fr; gap: 6px 28px; margin: 0 0 14px; }
dl.plain dt { color: var(--muted); }
dl.plain dd { margin: 0; }

/* Footer */
footer.site { border-top: 1px solid var(--line); background: var(--bg-soft); }
.foot { display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center; padding-top: 36px; padding-bottom: 36px; font-size: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: center; }
.foot nav a { color: var(--ink-2); text-decoration: none; }
.foot nav a:hover { color: var(--ink); text-decoration: underline; }
.copy { color: var(--muted); }

/* Responsive */
@media (max-width: 980px) {
  .nav { display: none; }
  .hero { padding: 48px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .art { max-width: 520px; }
  .block { padding: 72px 0; }
  .block-head { grid-template-columns: 1fr; gap: 12px; }
  .services li { grid-template-columns: 1fr; gap: 6px; }
  .tag { justify-self: start; }
  .steps { grid-template-columns: 1fr 1fr; gap: 36px 0; }
  .steps li:nth-child(2)::after { display: none; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .foot { grid-template-columns: 1fr; justify-items: start; }
  .foot nav { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .bar { gap: 12px; }
  .bar-end { gap: 12px; }
  .steps { grid-template-columns: 1fr; }
  .steps li { padding: 0 0 0 56px; }
  .steps li::before { position: absolute; left: 0; top: 0; margin: 0; }
  .steps li::after { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .form { padding: 22px; }
  .company div { grid-template-columns: 1fr; gap: 2px; }
}

/* Contact form: sending state */
.form .btn { gap: 10px; }
.form .btn .spinner { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.form .btn.is-sending { cursor: default; opacity: .85; }
.form .btn.is-sending .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .form .btn .spinner { animation-duration: 2s; } }
