/* AttachPop site — static, no external resources (fonts are self-hosted) */

@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/Outfit-SemiBold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1a1a1a;
  --sub: #555555;
  --paper: #f3f3f3;
  --white: #ffffff;
  --line: #e1e1e1;
  --pop: #e8452a;
  --ember: #f97336;
  --pop-text: #c0361c; /* pop for text on white (AA contrast) */
  --pop-wash: #fdeee9;
  --radius-sheet: 14px;
  --radius-chip: 999px;
  --wrap: 1080px;
  --font: "Segoe UI", "Yu Gothic UI", "Hiragino Sans", "Noto Sans JP", Meiryo, system-ui, sans-serif;
  --font-latin: "Outfit", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
}

a { color: var(--pop-text); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

img { max-width: 100%; height: auto; }

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

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 10;
  background: var(--ink); color: var(--white); padding: 8px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

/* ---------- header / footer ---------- */

.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 20px;
}
.brand { display: inline-flex; line-height: 0; }
.brand img { height: 30px; width: auto; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; font-size: 14px; }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:hover { color: var(--pop-text); }
.site-nav .lang { border: 1px solid #c9c9c9; border-radius: 999px; padding: 2px 12px; }

.site-footer { margin-top: 96px; border-top: 1px solid var(--line); background: var(--white); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; padding-block: 32px 40px; font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links a { color: var(--ink); }
.site-footer small { color: var(--sub); font-size: 13px; }

/* ---------- home: hero ---------- */

.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 56px; align-items: center; padding-block: 48px 88px;
}
.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  line-height: 1.32; letter-spacing: .01em; font-weight: 700;
  font-feature-settings: "palt";
  word-break: keep-all;
  overflow-wrap: anywhere;
}
html[lang="en"] .hero h1 { font-family: var(--font-latin); font-weight: 600; letter-spacing: -.01em; line-height: 1.12; }
.hero .lead { margin: 0 0 28px; max-width: 34em; color: var(--sub); font-size: 17px; }
.status {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0; padding: 10px 16px; border-radius: 10px;
  background: var(--white); border: 1px solid var(--line); font-size: 15px;
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ember); flex: none; }
.hero .more { display: block; margin-top: 18px; font-size: 15px; }

/* the draft sheet — the one memorable element */
.sheet {
  position: relative; margin: 0;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sheet);
  box-shadow: 0 1px 0 rgba(26, 26, 26, .04), 0 24px 48px -28px rgba(26, 26, 26, .35);
  padding: 22px 24px 26px; font-size: 14px;
}
.sheet-clip {
  position: absolute; top: -22px; right: 26px; width: 56px; height: 56px;
  border-radius: 14px; background: linear-gradient(var(--ember), var(--pop));
  display: grid; place-items: center; transform: rotate(6deg);
}
.sheet-clip img { width: 40px; height: 40px; }
.sheet-title { margin: 0 0 14px; font-weight: 700; font-size: 15px; }
.sheet-row { display: grid; grid-template-columns: 4.5em 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid #efefef; }
.sheet-row dt { color: var(--sub); }
.sheet-row dd { margin: 0; min-width: 0; }
.sheet-row .empty { color: #9a9a9a; }
.sheet-body { margin: 14px 0 18px; color: var(--sub); line-height: 1.7; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  padding: 6px 12px 6px 6px; border-radius: var(--radius-chip);
  background: var(--paper); border: 1px solid var(--line); font-size: 13px;
}
.chip b {
  flex: none; min-width: 34px; padding: 2px 6px; border-radius: 999px; text-align: center;
  font: 600 10.5px/1.4 var(--font-latin); letter-spacing: .02em; color: var(--white); background: var(--ink);
}
.chip.pdf b { background: #b42318; }
.chip.img b { background: #6b3fa0; }
.chip.xls b { background: #1d7a3e; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip small { color: var(--sub); font-size: 12px; flex: none; }
.sheet figcaption { margin-top: 16px; color: var(--sub); font-size: 13px; }

@media (prefers-reduced-motion: no-preference) {
  .chip { animation: pop-in .42s cubic-bezier(.2, 1.4, .4, 1) both; }
  .chip:nth-child(1) { animation-delay: .35s; }
  .chip:nth-child(2) { animation-delay: .55s; }
  .chip:nth-child(3) { animation-delay: .75s; }
  .sheet-clip { animation: clip-in .5s cubic-bezier(.2, 1.3, .4, 1) .15s both; }
}
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(.92); } }
@keyframes clip-in { from { opacity: 0; transform: rotate(-12deg) scale(.7); } }

/* ---------- home: sections ---------- */

.band { padding-block: 72px; border-top: 1px solid var(--line); }
.band h2 { margin: 0 0 12px; font-size: clamp(1.45rem, 2.6vw, 1.85rem); line-height: 1.4; }
html[lang="en"] .band h2 { font-family: var(--font-latin); font-weight: 600; }
.band .intro { margin: 0 0 36px; max-width: 40em; color: var(--sub); }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: block; margin-bottom: 10px;
  font: 600 44px/1 var(--font-latin); color: var(--pop);
}
.steps h3 { margin: 0 0 6px; font-size: 17px; }
.steps p { margin: 0; color: var(--sub); font-size: 15px; }

.google { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; align-items: start; }
.scope {
  margin: 0; padding: 20px 22px; border-radius: 12px; background: var(--white); border: 1px solid var(--line);
}
.scope p { margin: 0 0 6px; color: var(--sub); font-size: 14px; }
.scope code { display: block; overflow-wrap: anywhere; font-size: 14px; font-family: Consolas, "Cascadia Mono", monospace; }
.facts { margin: 0; padding: 0; list-style: none; }
.facts li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts li:first-child { padding-top: 0; }
.facts b { display: block; margin-bottom: 2px; }
.facts span { color: var(--sub); font-size: 15px; }

.env { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; }
.env div { padding-top: 14px; border-top: 2px solid var(--ink); }
.env dt { font-weight: 700; margin-bottom: 4px; }
.env dd { margin: 0; color: var(--sub); font-size: 15px; }

/* ---------- document pages (legal / contact) ---------- */

.doc { width: min(46rem, 100% - 32px); margin: 24px auto 0; }
.doc h1 { margin: 16px 0 8px; font-size: clamp(1.7rem, 3.4vw, 2.2rem); line-height: 1.35; }
html[lang="en"] .doc h1 { font-family: var(--font-latin); font-weight: 600; }
.doc h2 { margin: 48px 0 12px; font-size: 1.25rem; line-height: 1.5; }
.doc h3 { margin: 28px 0 8px; font-size: 1.05rem; }
.doc p, .doc li { overflow-wrap: anywhere; }
.doc ul, .doc ol { padding-left: 1.4em; }
.doc li + li { margin-top: 6px; }
.doc code { font-family: Consolas, "Cascadia Mono", monospace; font-size: .92em; background: var(--white); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; overflow-wrap: anywhere; }
.doc .updated { color: var(--sub); font-size: 14px; margin: 0 0 28px; }
.doc .alt-lang { font-size: 14px; }
.table-scroll { overflow-x: auto; margin: 16px 0; background: var(--white); border: 1px solid var(--line); border-radius: 10px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.doc th { background: #fafafa; font-weight: 700; }
.doc tr:last-child td { border-bottom: 0; }

.form-card { margin: 28px 0; padding: 24px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.form-card h2 { margin-top: 0; }
.button {
  display: inline-block; padding: 12px 22px; border-radius: 10px; border: 0;
  background: var(--ink); color: var(--white); font: inherit; font-weight: 700; text-decoration: none;
}
.button:hover { background: #333; color: var(--white); }
.button[aria-disabled="true"] { background: #bdbdbd; color: var(--white); cursor: not-allowed; }
.note { color: var(--sub); font-size: 14px; }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 24px; }
  .google { grid-template-columns: 1fr; gap: 28px; }
  .steps, .env { grid-template-columns: 1fr; gap: 24px; }
  .band { padding-block: 56px; }
}
@media (max-width: 520px) {
  .site-header { flex-direction: column; align-items: flex-start; }
  .sheet { padding: 20px 18px 22px; }
  .sheet-row { grid-template-columns: 4em 1fr; }
}
