/*
 * swimple. Design tokens — combined colors_and_type + components.
 * Drop into each repo's static/css/tokens.css.
 * Source: gnx-iida/swimple-lp · styles/tokens.css
 */

/* =========================================================
   swimple. Design Tokens — Colors & Typography
   ========================================================= */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&family=Space+Grotesk:wght@400;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* ---------- Brand Colors ---------- */
  --sw-primary:          #1A6B4A;   /* Forest Green — main brand */
  --sw-primary-dark:     #145539;
  --sw-primary-light:    #E8F5EE;
  --sw-primary-hover:    #155E41;   /* derived button hover */

  --sw-accent:           #D4763A;   /* Burnt Orange — CTA / price */
  --sw-accent-dark:      #B8611F;   /* derived hover */
  --sw-accent-light:     #FFF3EB;

  /* ---------- Neutral ---------- */
  --sw-text:             #1C1C1E;
  --sw-text-secondary:   #6B7280;
  --sw-text-muted:       #9CA3AF;
  --sw-bg:               #FAFAF8;
  --sw-surface:          #FFFFFF;
  --sw-border:           #E5E7EB;
  --sw-border-strong:    #D1D5DB;

  /* ---------- Semantic ---------- */
  --sw-success:          #1A6B4A;   /* reuse primary */
  --sw-warning:          #D4763A;   /* reuse accent */
  --sw-danger:           #C0382B;
  --sw-info:             #2D6CDF;

  /* ---------- OTA Brand ---------- */
  --sw-ota-jalan:        #E8430F;   /* じゃらん */
  --sw-ota-rakuten:      #BF0000;   /* 楽天トラベル */
  --sw-ota-booking:      #003580;   /* Booking.com */
  --sw-ota-agoda:        #EC3D36;
  --sw-ota-expedia:      #00355F;

  /* ---------- Typography ---------- */
  --sw-font-jp:     'Noto Sans JP', system-ui, -apple-system, sans-serif;
  --sw-font-en:     'Space Grotesk', 'Noto Sans JP', sans-serif;
  --sw-font-mono:   'JetBrains Mono', ui-monospace, Menlo, monospace;

  /* Display / Heading / Body scale (px) */
  --sw-fs-display:  56px;
  --sw-fs-h1:       40px;
  --sw-fs-h2:       32px;
  --sw-fs-h3:       24px;
  --sw-fs-h4:       20px;
  --sw-fs-lg:       18px;
  --sw-fs-body:     16px;
  --sw-fs-sm:       14px;
  --sw-fs-xs:       12px;

  --sw-lh-tight:    1.2;
  --sw-lh-snug:     1.4;
  --sw-lh-normal:   1.7;

  /* ---------- Spacing (4px unit) ---------- */
  --sw-space-1:  4px;
  --sw-space-2:  8px;
  --sw-space-3:  12px;
  --sw-space-4:  16px;
  --sw-space-5:  20px;
  --sw-space-6:  24px;
  --sw-space-8:  32px;
  --sw-space-10: 40px;
  --sw-space-12: 48px;
  --sw-space-16: 64px;
  --sw-space-20: 80px;  /* default section gap */
  --sw-space-24: 96px;

  /* ---------- Radii ---------- */
  --sw-radius-sm: 6px;
  --sw-radius-md: 12px;
  --sw-radius-lg: 16px;
  --sw-radius-pill: 999px;

  /* ---------- Shadows ---------- */
  --sw-shadow-sm:  0 1px 2px rgba(15, 23, 42, 0.04);
  --sw-shadow-md:  0 4px 12px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --sw-shadow-lg:  0 12px 32px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --sw-shadow-focus: 0 0 0 3px rgba(26, 107, 74, 0.22);

  /* ---------- Motion ---------- */
  --sw-ease:       cubic-bezier(.2, .8, .2, 1);
  --sw-dur-fast:   120ms;
  --sw-dur-base:   200ms;
  --sw-dur-slow:   360ms;
}

/* =========================================================
   Base resets for preview pages
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--sw-bg);
  color: var(--sw-text);
  font-family: var(--sw-font-jp);
  font-size: var(--sw-fs-body);
  line-height: var(--sw-lh-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Type utility classes ---------- */
.sw-display { font-family: var(--sw-font-en); font-weight: 700; font-size: var(--sw-fs-display); line-height: var(--sw-lh-tight); letter-spacing: -0.02em; }
.sw-h1      { font-family: var(--sw-font-jp); font-weight: 900; font-size: var(--sw-fs-h1); line-height: var(--sw-lh-tight); letter-spacing: -0.01em; }
.sw-h2      { font-family: var(--sw-font-jp); font-weight: 700; font-size: var(--sw-fs-h2); line-height: var(--sw-lh-snug); }
.sw-h3      { font-family: var(--sw-font-jp); font-weight: 700; font-size: var(--sw-fs-h3); line-height: var(--sw-lh-snug); }
.sw-h4      { font-family: var(--sw-font-jp); font-weight: 700; font-size: var(--sw-fs-h4); line-height: var(--sw-lh-snug); }
.sw-lead    { font-family: var(--sw-font-jp); font-weight: 400; font-size: var(--sw-fs-lg); line-height: var(--sw-lh-normal); color: var(--sw-text); }
.sw-body    { font-family: var(--sw-font-jp); font-weight: 400; font-size: var(--sw-fs-body); line-height: var(--sw-lh-normal); }
.sw-small   { font-family: var(--sw-font-jp); font-weight: 400; font-size: var(--sw-fs-sm); line-height: var(--sw-lh-normal); color: var(--sw-text-secondary); }
.sw-eyebrow { font-family: var(--sw-font-en); font-weight: 600; font-size: var(--sw-fs-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--sw-primary); }
.sw-mono    { font-family: var(--sw-font-mono); font-weight: 500; font-size: var(--sw-fs-sm); letter-spacing: 0; }
.sw-brand   { font-family: var(--sw-font-en); font-weight: 700; letter-spacing: -0.02em; }

/* ---------- Color utility classes ---------- */
.sw-ink-primary   { color: var(--sw-primary); }
.sw-ink-accent    { color: var(--sw-accent); }
.sw-ink-secondary { color: var(--sw-text-secondary); }

.sw-bg-primary       { background: var(--sw-primary); color: #fff; }
.sw-bg-primary-light { background: var(--sw-primary-light); color: var(--sw-primary-dark); }
.sw-bg-accent        { background: var(--sw-accent); color: #fff; }
.sw-bg-accent-light  { background: var(--sw-accent-light); color: var(--sw-accent-dark); }
.sw-bg-surface       { background: var(--sw-surface); color: var(--sw-text); }


/* =========================================================
   swimple. Component Styles — Buttons, Cards, Badges, Price
   Depends on tokens/colors_and_type.css
   ========================================================= */

/* ---------------- Buttons ---------------- */
.sw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  min-height: 44px;
  border-radius: var(--sw-radius-md);
  font-family: var(--sw-font-jp);
  font-weight: 700;
  font-size: var(--sw-fs-body);
  line-height: 1;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform var(--sw-dur-fast) var(--sw-ease),
              background var(--sw-dur-base) var(--sw-ease),
              box-shadow var(--sw-dur-base) var(--sw-ease),
              border-color var(--sw-dur-base) var(--sw-ease);
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
}
.sw-btn:focus-visible { outline: none; box-shadow: var(--sw-shadow-focus); }
.sw-btn:active { transform: translateY(1px); }
.sw-btn[disabled], .sw-btn.is-disabled { opacity: 0.45; pointer-events: none; }

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

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

.sw-btn--ghost   { background: transparent; color: var(--sw-text); border-color: var(--sw-border-strong); }
.sw-btn--ghost:hover   { background: #F4F4F1; border-color: var(--sw-text); }

.sw-btn--sm { padding: 8px 14px; min-height: 36px; font-size: var(--sw-fs-sm); border-radius: var(--sw-radius-sm); }
.sw-btn--lg { padding: 16px 28px; min-height: 56px; font-size: var(--sw-fs-lg); border-radius: var(--sw-radius-lg); }
.sw-btn--block { width: 100%; }

/* ---------------- Cards ---------------- */
.sw-card {
  background: var(--sw-surface);
  border: 1px solid var(--sw-border);
  border-radius: var(--sw-radius-lg);
  padding: var(--sw-space-6);
  box-shadow: var(--sw-shadow-md);
}
.sw-card--flat { box-shadow: none; }
.sw-card--lift { box-shadow: var(--sw-shadow-lg); }
.sw-card--tinted { background: var(--sw-primary-light); border-color: transparent; }

/* ---------------- Badges ---------------- */
.sw-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--sw-radius-pill);
  font-family: var(--sw-font-jp);
  font-weight: 700;
  font-size: var(--sw-fs-xs);
  line-height: 1.4;
  letter-spacing: 0.02em;
}
.sw-badge--primary { background: var(--sw-primary-light); color: var(--sw-primary-dark); }
.sw-badge--accent  { background: var(--sw-accent-light);  color: var(--sw-accent-dark); }
.sw-badge--neutral { background: #F3F4F6; color: var(--sw-text); }
.sw-badge--solid   { background: var(--sw-primary); color: #fff; }

/* OTA badges — brand colors */
.sw-badge--ota { padding: 4px 10px; border-radius: var(--sw-radius-sm); color: #fff; font-family: var(--sw-font-en); font-weight: 700; font-size: 11px; letter-spacing: 0.04em; }
.sw-badge--jalan   { background: var(--sw-ota-jalan); }
.sw-badge--rakuten { background: var(--sw-ota-rakuten); }
.sw-badge--booking { background: var(--sw-ota-booking); }
.sw-badge--agoda   { background: var(--sw-ota-agoda); }
.sw-badge--expedia { background: var(--sw-ota-expedia); }

/* ---------------- Price display ---------------- */
.sw-price { display: inline-flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sw-price__old {
  font-family: var(--sw-font-en);
  font-size: var(--sw-fs-lg);
  color: var(--sw-text-muted);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}
.sw-price__new {
  font-family: var(--sw-font-en);
  font-weight: 700;
  font-size: 32px;
  color: var(--sw-primary);
  letter-spacing: -0.01em;
}
.sw-price__new .sw-price__unit { font-size: 16px; font-weight: 600; margin-left: 2px; color: var(--sw-primary-dark); }
.sw-price__save {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--sw-accent-light);
  color: var(--sw-accent-dark);
  font-family: var(--sw-font-en);
  font-weight: 700;
  font-size: 13px;
  border-radius: var(--sw-radius-sm);
  letter-spacing: 0.01em;
}
.sw-price__save::before { content: "▼"; font-size: 10px; transform: translateY(-1px); }

/* ---------------- Inputs ---------------- */
.sw-input, .sw-select, .sw-textarea {
  width: 100%;
  padding: 12px 14px;
  min-height: 44px;
  border: 1.5px solid var(--sw-border);
  border-radius: var(--sw-radius-md);
  background: var(--sw-surface);
  font-family: var(--sw-font-jp);
  font-size: var(--sw-fs-body);
  color: var(--sw-text);
  transition: border-color var(--sw-dur-base) var(--sw-ease), box-shadow var(--sw-dur-base) var(--sw-ease);
}
.sw-input::placeholder { color: var(--sw-text-muted); }
.sw-input:focus, .sw-select:focus, .sw-textarea:focus {
  outline: none;
  border-color: var(--sw-primary);
  box-shadow: var(--sw-shadow-focus);
}
.sw-label { display: block; font-size: var(--sw-fs-sm); font-weight: 700; color: var(--sw-text); margin-bottom: 6px; }
.sw-help  { font-size: var(--sw-fs-xs); color: var(--sw-text-secondary); margin-top: 6px; }

/* ---------------- Section helper ---------------- */
.sw-section { padding: var(--sw-space-20) var(--sw-space-6); }
.sw-container { max-width: 1140px; margin: 0 auto; }

/* ---------------- Divider ---------------- */
.sw-divider { height: 1px; background: var(--sw-border); border: 0; margin: var(--sw-space-8) 0; }

/* ---------------- Focus ring ---------------- */
:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--sw-primary);
  outline-offset: 2px;
}

