/* ==========================================================================
   RONA Works - Corporate Site Styles
   Design: Trust & Authority / clean, generous whitespace, light mode only
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --color-primary: #0F172A;      /* navy */
  --color-accent: #0369A1;       /* CTA blue */
  --color-accent-hover: #075985;
  --color-bg: #F8FAFC;
  --color-fg: #020617;
  --color-muted: #E8ECF1;
  --color-border: #E2E8F0;
  --color-surface: #FFFFFF;
  --color-text-subtle: #475569;  /* 4.5:1+ on white/bg */
  --color-on-dark: #FFFFFF;
  --color-on-dark-subtle: #CBD5E1;

  --font-heading: 'Poppins', 'Noto Sans JP', sans-serif;
  --font-body: 'Noto Sans JP', sans-serif;

  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.05), 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-card-hover: 0 2px 4px rgba(15, 23, 42, 0.06), 0 10px 24px rgba(15, 23, 42, 0.10);

  --container-max: 1120px;
  --header-height: 64px;
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 8px);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-fg);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.4;
  color: var(--color-primary);
}

ul, ol {
  list-style: none;
}

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.icon-lg {
  width: 28px;
  height: 28px;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 20px;
}

.sp-only { display: inline; }
.pc-only { display: none; }

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  top: -48px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--color-primary);
  color: var(--color-on-dark);
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 150ms ease-out;
}

.skip-link:focus {
  top: 0;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms ease-out, border-color 200ms ease-out, transform 150ms ease-out;
  touch-action: manipulation;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-on-dark);
}

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

.btn-ghost {
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: var(--color-on-dark);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.8);
  background-color: rgba(255, 255, 255, 0.08);
}

.btn-large {
  min-height: 56px;
  padding: 16px 36px;
  font-size: 1.0625rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  color: var(--color-primary);
  text-decoration: none;
}

.brand span {
  color: var(--color-accent);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  color: var(--color-primary);
  cursor: pointer;
  border-radius: 8px;
}

.nav-toggle .icon {
  width: 24px;
  height: 24px;
}

.nav-toggle .icon-close { display: none; }

.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.nav-menu {
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  padding: 8px 20px 16px;
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

.nav-menu.is-open {
  display: flex;
}

.nav-menu a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 8px;
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
  border-radius: 8px;
}

.nav-menu a:hover {
  background-color: var(--color-muted);
}

.nav-menu .nav-cta {
  justify-content: center;
  margin-top: 8px;
  background-color: var(--color-accent);
  color: var(--color-on-dark);
  font-weight: 600;
}

.nav-menu .nav-cta:hover {
  background-color: var(--color-accent-hover);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 88px 0 96px;
  background-color: var(--color-primary);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(150deg, #0F172A 0%, #17233F 55%, #1E293B 100%);
  background-size: 48px 48px, 48px 48px, cover;
  color: var(--color-on-dark);
}

.hero-inner {
  max-width: 760px;
}

.hero-eyebrow {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7DD3FC; /* 8.5:1 on navy */
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(1.9rem, 5.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-on-dark);
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 1.0625rem;
  color: var(--color-on-dark-subtle);
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---------- Sections ---------- */
.section {
  padding: 88px 0;
}

.section-alt {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section-eyebrow {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 16px;
}

.section-lead {
  color: var(--color-text-subtle);
  max-width: 640px;
  margin-bottom: 48px;
}

/* ---------- Cards (Services / Products) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: box-shadow 200ms ease-out, transform 200ms ease-out;
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  border-radius: 12px;
  background-color: #E0F2FE;
  color: var(--color-accent);
}

.card h3 {
  font-size: 1.1875rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.card p {
  color: var(--color-text-subtle);
}

/* Product cards */
.product-card .card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.badge-released {
  background-color: var(--color-accent);
  color: var(--color-on-dark);
}

.badge-coming-soon {
  background-color: var(--color-muted);
  color: #334155; /* 7.5:1 on muted */
}

.product-tagline {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.product-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: auto;
  padding-top: 16px;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
}

.product-link:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

/* ---------- Process ---------- */
.process-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  counter-reset: step;
}

.process-step {
  position: relative;
  padding-left: 64px;
}

/* vertical connector (mobile) */
.process-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 52px;
  bottom: -28px;
  width: 2px;
  background-color: var(--color-border);
}

.step-number {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: var(--color-on-dark);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.0625rem;
}

.process-step h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
  padding-top: 6px;
}

.process-step p {
  color: var(--color-text-subtle);
}

/* ---------- Why ---------- */
.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.why-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border-radius: 50%;
  background-color: var(--color-muted);
  color: var(--color-primary);
}

.why-item h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.why-item p {
  color: var(--color-text-subtle);
}

/* ---------- Contact ---------- */
.contact {
  background-color: var(--color-primary);
  background-image: linear-gradient(150deg, #0F172A 0%, #17233F 60%, #1E293B 100%);
}

.contact-inner {
  max-width: 640px;
  text-align: center;
}

.contact .section-eyebrow {
  color: #7DD3FC;
}

.contact .section-title {
  color: var(--color-on-dark);
}

.contact-lead {
  color: var(--color-on-dark-subtle);
  margin-bottom: 36px;
}

.contact-note {
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--color-on-dark-subtle);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 40px 0;
  background-color: #020617;
  color: var(--color-on-dark-subtle);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.footer-brand {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--color-on-dark);
}

.footer-brand span {
  color: #7DD3FC;
}

.footer-sister {
  font-size: 0.875rem;
}

.footer-sister a {
  color: #93C5FD; /* 7:1 on #020617 */
  text-underline-offset: 3px;
}

.footer-copy {
  font-size: 0.8125rem;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 300ms ease-out, transform 300ms ease-out;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .card {
    transition: none;
  }
}

/* ==========================================================================
   Breakpoints: 375 (base) / 768 / 1024 / 1440
   ========================================================================== */

/* ---------- >= 768px ---------- */
@media (min-width: 768px) {
  .sp-only { display: none; }
  .pc-only { display: inline; }

  .container {
    padding-inline: 32px;
  }

  .nav-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
  }

  .nav-menu a {
    min-height: 44px;
    padding: 8px 14px;
    font-size: 0.9375rem;
  }

  .nav-menu .nav-cta {
    margin-top: 0;
    margin-left: 8px;
    padding: 8px 20px;
  }

  .hero {
    padding: 120px 0 128px;
  }

  .section {
    padding: 104px 0;
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }

  /* Process: horizontal timeline */
  .process-steps {
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
  }

  .process-step {
    padding-left: 0;
    padding-top: 64px;
  }

  .step-number {
    top: 0;
    left: 0;
  }

  /* horizontal connector */
  .process-step:not(:last-child)::after {
    left: 52px;
    right: -24px;
    top: 21px;
    bottom: auto;
    width: auto;
    height: 2px;
  }
}

/* ---------- >= 1024px ---------- */
@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }

  .hero-title {
    line-height: 1.3;
  }
}

/* ---------- >= 1440px ---------- */
@media (min-width: 1440px) {
  .hero {
    padding: 144px 0 152px;
  }
}
