/* Aibex Website Styles */

/*
 * Shares the DraftFinder / DraftCamera / DraftWriter design language (light
 * hero, 4rem section rhythm, card grids, blue accents) so all product sites
 * read as one family. Brand aliases (--primary-blue, --primary-dark,
 * --text-dark, --bg-light, --bg-gray, --bg-gray-dark, --border-color,
 * --text-muted, --min-tap-area, --shadow-*) and the semantic color tokens
 * (--color-semantic-*) come from the global stylesheet (src/css/style.css +
 * tokens.css), loaded FIRST via partials/head.njk, so they cascade in here —
 * no duplicate token block, no hardcoded brand colors.
 *
 * .hero / .section / .section-title are also defined globally; the rules below
 * intentionally override them for the product-page treatment, exactly as
 * src/DraftFinder/css/style.css does.
 *
 * The one deliberate divergence from DraftFinder: there is NO .download-btn and
 * no CTA button of any kind. The page is open source (MIT) and its only ways
 * out are plain GitHub links (repository / Issues / Releases); the mailing-list
 * form and the CTA buttons were removed on 2026-09-10. Do not reintroduce a
 * button — tests/verify-aibex-page.sh fails on `contact-btn` / `<form`.
 */

/* Hero */
.hero {
  padding: 4rem 0;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-gray) 0%, var(--bg-gray-dark) 100%);
}

.hero-app-icon {
  display: block;
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
  border-radius: 27px; /* ~22.5% — macOS squircle approximation */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/*
 * Hero order since 2026-09-10: icon → product name (h1) → catchphrase →
 * tagline → subtext. The name is new and unknown, so it leads and is the
 * largest thing on the page; the catchphrase moved from the h1 into its own
 * line right under it (same shape as Conductor / cmux / Claude Code). The
 * <title> still reads "Aibex – <catchphrase>".
 */
.hero h1 {
  font-size: 3.5rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--primary-blue);
}

/* Scoped with `.hero` for the same specificity reason as .hero-subtext below —
 * the global `.hero p` would otherwise set 1.5rem / 2rem margin on it. */
.hero .hero-catch {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary-blue);
  margin: 0 auto 1.25rem;
}

/* Holds the "なんか知らんけど" paragraph — the page's framing, promoted from the
 * problems section into the hero on 2026-08-31. */
.hero-tagline {
  max-width: 640px;
  margin: 0 auto 2rem;
}

.hero-tagline p {
  font-size: 1.25rem;
  color: var(--text-dark);
  margin-bottom: 0;
  line-height: 1.5;
}

/*
 * NOTE ON SPECIFICITY — the selector below is deliberately prefixed with
 * `.hero`.
 *
 * The global stylesheet carries an unscoped `.hero p { font-size: 1.5rem;
 * margin-bottom: 2rem; color: var(--text-dark); }` (src/css/style.css). That is
 * (0,1,1); a bare `.hero-subtext` is (0,1,0), so the global rule wins no matter
 * which file loads later and the subtext renders at tagline size.
 * `.hero-tagline p` is unaffected — it ties at (0,1,1) and wins on load order —
 * which is why the problem is easy to miss.
 *
 * Do not "simplify" this back to an unscoped class.
 */
.hero .hero-subtext {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 0;
}

/*
 * The status pill that used to sit above the h1 was removed on 2026-08-30 at the
 * author's request. The "no build yet" signal it carried now rests on the
 * Where-it-stands table and the FAQ ("準備中") — see the release-state
 * assertions in tests/verify-aibex-page.sh, which exist so that signal cannot
 * quietly disappear from one place while the other still makes the claim.
 *
 * The CTA button family (.contact-btn, .contact-btn--secondary) and the Kit
 * sign-up form (.beta-signup*) that used to follow here were removed on
 * 2026-09-10 together with the markup they styled.
 */

/* Sections */
.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 1rem;
  color: var(--primary-blue);
}

/* Standfirst under a section title — sets up the cards that follow. */
.section-lead {
  max-width: 680px;
  margin: 0 auto 3rem;
  text-align: center;
  color: var(--text-muted);
}

.bg-gray {
  background-color: var(--bg-gray);
}

/* The two problems this product is trying to solve (steering/product.md). */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 860px;
  margin: 0 auto;
}

.problem-card {
  padding: 2rem;
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

/* Concrete complaints inside a problem card — same dash markers as
 * .premise-list, tightened for card interiors. */
.problem-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.problem-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
}

.problem-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--primary-blue);
}

.problem-list li:last-child {
  margin-bottom: 0;
}

.problem-card h3 {
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.problem-card p:last-child {
  margin-bottom: 0;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.feature-card {
  padding: 2rem;
  background-color: var(--bg-light);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/*
 * Each card spans three rows of the grid — icon, heading, body — so that the
 * cards sitting side by side share those row tracks. Stretching the cards to
 * equal height is not enough on its own: a heading that wraps to three lines
 * while its neighbours wrap to two pushes its body text a whole line lower, and
 * the paragraphs stop lining up across the row. Every card is exactly these
 * three children, which is what makes `span 3` safe to state here.
 *
 * Guarded by @supports because the fallback has to be today's layout: without
 * subgrid the `grid-row: span 3` alone would still place the cards correctly but
 * would reserve the parent's row gaps inside each card.
 */
@supports (grid-template-rows: subgrid) {
  .feature-card {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 3;
    /* The parent's 2rem is the gap *between* cards; inside one it would tear the
       card apart, so the subgrid declares its own gutters. */
    row-gap: 0;
  }
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.feature-card p:last-child {
  margin-bottom: 0;
}

/*
 * Nine feature cards in one flat grid is exactly the cognitive load this
 * product exists to reduce, so they are split into three named groups.
 */
.feature-group {
  max-width: 1000px;
  margin: 0 auto 3.5rem;
}

.feature-group:last-child {
  margin-bottom: 0;
}

.feature-group-title {
  color: var(--text-dark);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 0;
}


/* Inline code (glossary terms, env vars, shell triggers) */
code {
  background-color: var(--bg-gray-dark);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
}


/* "What we are assuming" — the honest part of an unreleased teaser. */
.premise-list {
  max-width: 760px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.premise-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 1rem;
}

.premise-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--primary-blue);
  font-weight: 700;
}

.premise-list li:last-child {
  margin-bottom: 0;
}

/* Current state of the build (stack / platform / status) */
.spec-table {
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.spec-table th,
.spec-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  vertical-align: top;
}

.spec-table th {
  width: 34%;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
}

.spec-table tr:last-child th,
.spec-table tr:last-child td {
  border-bottom: none;
}

/*
 * 表の中の分割できない長い語を折り返せるようにする
 * （consistency-refinement 受入条件 4.2）。
 *
 * 「エージェント」行の `.claude/settings.json` は空白を含まないため、
 * 既定では折り返し候補が 1 つも無い。この語の幅が表の min-content 幅を
 * 押し上げ、狭い画面で文書ごと横へはみ出していた。実測で英語版は 375px 時に
 * 38px、日本語版は 320px 時に 5px 超過していた（英文のほうが周囲の語が長い）。
 *
 * `anywhere` を使うのは、`break-word` と違って min-content 幅の計算にも
 * 効くため。表の幅そのものを縮めたいので、描画時だけ折り返す `break-word`
 * では足りない。
 *
 * 表を横スクロール容器で包む手もあるが採らない。5 行の情報表であり、
 * 横スクロールは折り返しより読みにくい。
 */
.spec-table th,
.spec-table td,
.spec-table code {
  overflow-wrap: anywhere;
}

/* FAQ (details / summary) */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  /* Explicit background: the FAQ moved onto the gray band on 2026-08-31, and a
   * transparent item there reads as an empty outline. On white this is a no-op. */
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 1.25rem;
  margin-bottom: 1rem;
  background-color: var(--bg-light);
}

.faq-question {
  cursor: pointer;
  font-weight: 600;
  color: var(--primary-blue);
  padding: 0.5rem 0;
  list-style: none;
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question::before {
  content: "＋";
  margin-right: 0.5rem;
  color: var(--primary-blue);
}

.faq-item[open] .faq-question::before {
  content: "－";
}

.faq-answer {
  padding: 0.5rem 0 0.75rem;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* Closing contact block */
.contact-block {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.contact-block p {
  color: var(--text-muted);
}

.lang-switch {
  text-align: center;
  margin-top: 2.5rem;
  margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-app-icon {
    width: 96px;
    height: 96px;
    border-radius: 22px;
    margin-bottom: 1rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero .hero-catch {
    font-size: 1.3rem;
  }

  .hero-tagline p {
    font-size: 1.05rem;
  }

  .features-grid,
  .problem-grid {
    grid-template-columns: 1fr;
  }

  .spec-table th {
    white-space: normal;
  }
}
