/*
 * takahii.co — the public site.
 *
 * The palette is taken from the platform logo
 * (addons/takahii_base/static/description/icon.png): a charcoal plate, a white
 * lowercase wordmark and two orange dots. So: charcoal is the ink and the dark
 * surface, orange is the only accent and is used sparingly — as the dots are.
 *
 * Hand-written, no build step, no external request (see the CSP in
 * deploy/nginx/snippets/static_site.conf).
 */

:root {
  --ink: #31363a; /* the logo plate */
  --ink-deep: #23272a;
  --accent: #ff5a00; /* the i-dots */
  --accent-deep: #d94b00; /* accessible on white for text-sized type */
  --paper: #ffffff;
  --surface: #f5f6f7;
  --surface-2: #eceef0;
  --line: #dfe3e6;
  --text: #22262a;
  --muted: #5d666c;
  --radius: 10px;
  --wrap: 1040px;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic",
    Meiryo, system-ui, sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background: var(--paper);
  font-feature-settings: "palt" 1;
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--accent-deep);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  z-index: 10;
  background: var(--paper);
  padding: 8px 12px;
  border-radius: var(--radius);
}

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

.site-header {
  background: var(--ink);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 5;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  padding: 6px 0;
}

.brand img {
  display: block;
  width: 106px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 14px;
}

.site-nav a {
  color: #e6e9eb;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
}

.site-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.site-nav .nav-cta {
  border: 1px solid rgba(255, 255, 255, 0.35);
}

/* ------------------------------------------------------------------ hero */

.hero {
  background: linear-gradient(180deg, var(--surface), var(--paper));
  border-bottom: 1px solid var(--line);
  padding: 72px 0 64px;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.hero .lede {
  margin: 0;
  max-width: 62ch;
  font-size: 17px;
  color: var(--muted);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding-left: 14px;
  border-left: 4px solid var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-deep);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-secondary:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* -------------------------------------------------------------- sections */

.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.section h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.4;
}

.section-note {
  margin: 0 0 32px;
  color: var(--muted);
}

.cards {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.card h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.card .card-sub {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.card ul {
  margin: 16px 0 0;
  padding-left: 1.2em;
  color: var(--muted);
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--surface-2);
  color: var(--muted);
}

.badge-accent {
  background: rgba(255, 90, 0, 0.12);
  color: var(--accent-deep);
}

/* --------------------------------------------------------------- pricing */

.price-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-bottom: 24px;
}

.price {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.price .amount {
  display: block;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

.price .amount .unit {
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
}

.callout {
  border-left: 4px solid var(--accent);
  background: var(--paper);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  color: var(--muted);
}

.callout strong {
  color: var(--text);
}

/* ---------------------------------------------------------------- legal */

.legal {
  padding: 56px 0 72px;
}

.legal .wrap {
  max-width: 760px;
}

.legal h1 {
  margin: 0 0 4px;
  font-size: clamp(24px, 4vw, 32px);
}

.legal .updated {
  margin: 0 0 40px;
  font-size: 14px;
  color: var(--muted);
}

.legal h2 {
  margin: 40px 0 12px;
  font-size: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.legal h3 {
  margin: 24px 0 8px;
  font-size: 16px;
}

.legal ol,
.legal ul {
  padding-left: 1.4em;
}

.legal li {
  margin-bottom: 6px;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}

.legal th,
.legal td {
  border: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.legal th {
  width: 34%;
  background: var(--surface);
  font-weight: 700;
}

/* Closing line of a legal document ("以上"). */
.legal .closing {
  margin-top: 48px;
}

/* Marker for a value that is not filled in yet. Loud on purpose: nothing uses
   it today, and nothing should be published while it does (see README.md). */
.tbd {
  background: #fff3cd;
  border: 1px dashed #d39e00;
  border-radius: 4px;
  padding: 1px 8px;
  font-weight: 700;
  color: #7a5b00;
}

/* ---------------------------------------------------------------- form */

.form {
  max-width: 640px;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.field .req {
  color: var(--accent-deep);
  font-size: 12px;
  margin-left: 4px;
}

.field .hint {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  color: inherit;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 12px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 90, 0, 0.18);
}

.field textarea {
  min-height: 180px;
  line-height: 1.7;
  resize: vertical;
}

/* The honeypot: off-screen rather than display:none, which some bots skip. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.form-status[hidden] {
  display: none;
}

.form-status.is-error {
  border-color: #e3b7a0;
  background: #fdf1eb;
  color: #8a3b10;
}

.form-status.is-ok {
  border-color: #b7d8c0;
  background: #eef7f0;
  color: #1e6b38;
}

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

.site-footer {
  background: var(--ink);
  color: #c9ced2;
  padding: 48px 0 40px;
  font-size: 14px;
}

.footer-inner {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.site-footer img {
  width: 100px;
  height: auto;
  margin-bottom: 12px;
}

.site-footer a {
  color: #e6e9eb;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links li {
  margin-bottom: 6px;
}

.footer-links h2 {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8d959a;
}

.copyright {
  margin: 36px 0 0;
  font-size: 13px;
  color: #8d959a;
}

/* ----------------------------------------------------------------- print */

@media print {
  .site-header,
  .site-footer,
  .hero-actions {
    display: none;
  }

  body {
    font-size: 11pt;
  }

  .legal .wrap {
    max-width: none;
    padding: 0;
  }

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