/* ============================================================
   Atsumi Labs — washi paper & ink, with a vermillion seal.
   Fraunces (display) · Hanken Grotesk (body) · Spline Sans Mono (labels)
   ============================================================ */

:root {
  --paper:   #f4ede1;   /* warm washi */
  --paper-2: #ece1cf;   /* deeper paper for panels */
  --paper-3: #e6d9c4;
  --ink:     #211b16;   /* warm near-black */
  --ink-2:   #4a4038;   /* secondary text */
  --ink-3:   #7a6e60;   /* muted */
  --shu:     #d8472b;   /* 朱 vermillion — the one accent */
  --shu-deep:#b23a23;
  --shu-soft: rgba(216, 71, 43, 0.12);
  --line:    rgba(33, 27, 22, 0.14);
  --line-2:  rgba(33, 27, 22, 0.08);

  --serif: "Fraunces", Georgia, serif;
  --sans:  "Hanken Grotesk", system-ui, sans-serif;
  --mono:  "Spline Sans Mono", ui-monospace, monospace;

  --maxw: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(1100px 700px at 85% -10%, rgba(216,71,43,0.06), transparent 60%),
    radial-gradient(900px 650px at -5% 8%, rgba(150,120,70,0.08), transparent 55%);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* paper grain overlay */
.grain {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 9999;
  opacity: 0.04; mix-blend-mode: multiply;
}

::selection { background: var(--shu); color: var(--paper); }

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

/* ───────── shared bits ───────── */
.seal {
  display: inline-grid; place-items: center;
  width: 1.7em; height: 1.7em; border-radius: 24%;
  background: var(--shu); color: var(--paper);
  font-family: var(--serif); font-weight: 500;
  line-height: 1; font-size: 1em;
  transform: rotate(-4deg);
  box-shadow: 0 6px 18px rgba(178,58,35,0.28);
}

.sec-label {
  font-family: var(--mono);
  font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--shu-deep);
}

/* ───────── header ───────── */
.site-head {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem clamp(1.2rem, 5vw, 3rem);
  background: rgba(244,237,225,0.78);
  backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid var(--line-2);
}
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand .seal { font-size: 1.15rem; }
.wordmark {
  font-family: var(--serif); font-weight: 600; font-size: 1.18rem;
  letter-spacing: -0.01em;
}
.nav { display: flex; gap: clamp(1rem, 3vw, 2.2rem); }
.nav a {
  font-size: 0.92rem; font-weight: 500; color: var(--ink-2);
  position: relative; padding: 0.2rem 0;
  transition: color 0.25s ease;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 1.5px; background: var(--shu);
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

/* ───────── hero ───────── */
.hero {
  position: relative;
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(4rem, 13vh, 9rem) clamp(1.2rem, 5vw, 3rem) clamp(3rem, 8vh, 6rem);
  overflow: hidden;
}
.kanji-ghost {
  position: absolute; top: -6%; right: -4%;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(20rem, 46vw, 42rem); line-height: 0.8;
  color: var(--ink); opacity: 0.04; user-select: none;
  pointer-events: none; z-index: 0;
}
.kanji-ghost--right { right: auto; left: -6%; top: 0; opacity: 0.035; }
.hero-inner { position: relative; z-index: 1; max-width: 760px; }

.eyebrow {
  font-family: var(--mono); font-size: 0.82rem;
  letter-spacing: 0.04em; color: var(--ink-3); margin-bottom: 1.6rem;
}
.eyebrow em { color: var(--shu-deep); font-style: italic; }

.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.9rem, 8.5vw, 6.2rem);
  line-height: 0.98; letter-spacing: -0.025em;
  font-optical-sizing: auto;
  margin-bottom: 1.6rem;
}
.ink-accent { color: var(--shu); font-style: italic; font-weight: 400; }

.lede {
  font-size: clamp(1.05rem, 1.7vw, 1.32rem);
  color: var(--ink-2); max-width: 58ch; line-height: 1.65;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.6rem; border-radius: 999px;
  font-weight: 600; font-size: 0.96rem;
  transition: transform 0.2s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.btn-primary {
  background: var(--ink); color: var(--paper);
}
.btn-primary:hover { background: var(--shu); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(216,71,43,0.3); }
.btn-ghost { border: 1.5px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

/* ───────── section heads ───────── */
.section-head { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.2rem, 5vw, 3rem); }
.section-head h2,
.about h2,
.contact h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.02;
  letter-spacing: -0.02em; margin: 0.8rem 0;
}
.section-note { color: var(--ink-2); max-width: 46ch; }

/* ───────── work / catalog ───────── */
.work { padding: clamp(3rem, 8vh, 6rem) 0; }
.catalog {
  list-style: none;
  max-width: var(--maxw); margin: 2.8rem auto 0;
  padding: 0 clamp(1.2rem, 5vw, 3rem);
  display: grid; gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
}
.card {
  position: relative; overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.9rem 1.8rem 2rem;
  display: flex; flex-direction: column;
  transition: transform 0.3s cubic-bezier(.2,.7,.3,1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(216,71,43,0.4);
  box-shadow: 0 22px 50px -22px rgba(33,27,22,0.4);
}
.card-kanji {
  position: absolute; right: -0.4rem; bottom: -1.6rem;
  font-family: var(--serif); font-size: 9rem; line-height: 1;
  color: var(--ink); opacity: 0.05; pointer-events: none;
  transition: opacity 0.3s ease, transform 0.4s ease;
}
.card:hover .card-kanji { opacity: 0.1; transform: translateY(-4px) rotate(-3deg); }

.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.num { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; color: var(--ink-3); }
.status {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 0.28rem 0.6rem; border-radius: 999px;
  border: 1px solid currentColor;
}
.status-live { color: #2f7d4f; }
.status-beta { color: var(--shu-deep); }
.status-soon { color: var(--ink-3); }

.card h3 { font-family: var(--serif); font-weight: 600; font-size: 1.75rem; line-height: 1; letter-spacing: -0.01em; }
.card-tag { font-weight: 600; color: var(--shu-deep); font-size: 0.95rem; margin: 0.35rem 0 0.9rem; }
.card-desc { color: var(--ink-2); font-size: 0.96rem; position: relative; z-index: 1; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 1.2rem 0 1.5rem; }
.chips li {
  font-family: var(--mono); font-size: 0.72rem; color: var(--ink-2);
  background: rgba(33,27,22,0.05); border: 1px solid var(--line-2);
  padding: 0.3rem 0.62rem; border-radius: 7px;
}

.card-link {
  margin-top: auto; font-weight: 600; font-size: 0.95rem; color: var(--shu-deep);
  align-self: flex-start; position: relative; z-index: 1;
  transition: gap 0.2s ease, color 0.2s ease;
}
.card-link[aria-disabled="true"] { color: var(--ink-3); cursor: default; }
a.card-link:hover { color: var(--shu); letter-spacing: 0.01em; }

/* ───────── about ───────── */
.about {
  position: relative; overflow: hidden;
  margin: clamp(3rem, 8vh, 6rem) 0; padding: clamp(3rem, 8vh, 6rem) 0;
  background: var(--paper-2);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.about-grid {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 clamp(1.2rem, 5vw, 3rem);
  display: grid; grid-template-columns: 0.42fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem);
}
.about-body p { color: var(--ink-2); margin-bottom: 1.1rem; max-width: 60ch; }
.about-body strong { color: var(--ink); }
.about em { font-style: italic; color: var(--shu-deep); }

.principles { list-style: none; margin-top: 2rem; display: grid; gap: 0.9rem; }
.principles li {
  padding-left: 1.4rem; position: relative; color: var(--ink-2); font-size: 0.96rem;
}
.principles li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 8px; height: 8px; background: var(--shu); border-radius: 2px;
  transform: rotate(45deg);
}
.principles span { display: block; font-weight: 700; color: var(--ink); font-size: 1rem; }

/* ───────── contact ───────── */
.contact {
  position: relative; overflow: hidden; text-align: center;
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(4rem, 12vh, 8rem) clamp(1.2rem, 5vw, 3rem);
}
.contact .seal-lg {
  font-size: 3.2rem; margin: 0 auto 1.6rem; display: grid;
}
.contact-note { color: var(--ink-2); max-width: 42ch; margin: 0.8rem auto 2rem; }
.mailto {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.5rem, 4.5vw, 2.8rem); color: var(--shu);
  border-bottom: 2px solid transparent; transition: border-color 0.25s ease;
}
.mailto:hover { border-color: var(--shu); }

/* ───────── footer ───────── */
.site-foot {
  border-top: 1px solid var(--line);
  padding: 2.4rem clamp(1.2rem, 5vw, 3rem);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.2rem;
  max-width: var(--maxw); margin: 0 auto;
}
.foot-brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--serif); font-weight: 600; }
.foot-brand .seal { font-size: 1rem; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.foot-nav a { font-size: 0.9rem; color: var(--ink-2); transition: color 0.2s ease; }
.foot-nav a:hover { color: var(--shu-deep); }
.copy { width: 100%; font-size: 0.8rem; color: var(--ink-3); border-top: 1px solid var(--line-2); padding-top: 1.2rem; }

/* ───────── reveal animation ───────── */
.reveal { opacity: 0; transform: translateY(18px); animation: rise 0.85s cubic-bezier(.2,.7,.3,1) forwards; animation-delay: var(--d, 0ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ───────── responsive ───────── */
@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; }
  .nav { gap: 1.1rem; }
}
@media (max-width: 460px) {
  .nav a:nth-child(1) { display: none; } /* trim on tiny screens */
  .wordmark { font-size: 1.05rem; }
}
