:root {
  --brand-black: #000000;
  --brand-navy: #0d1a3d;
  --brand-white: #ffffff;

  --surface-bg: #f5f6fa;
  --surface-card: #ffffff;
  --surface-card-raised: #ffffff;
  --surface-border: #e2e6f0;
  --topbar-bg: rgba(245, 246, 250, 0.75);

  --text-primary: #050914;
  --text-secondary: #48506b;

  --accent: #24399e;
  --accent-strong: #14266e;
}

:root[data-theme='dark'] {
  --surface-bg: #000000;
  --surface-card: #0a0e1a;
  --surface-card-raised: #0f1428;
  --surface-border: rgba(255, 255, 255, 0.12);
  --topbar-bg: rgba(0, 0, 0, 0.72);

  --text-primary: #ffffff;
  --text-secondary: #9aa5c0;

  --accent: #3b5bfa;
  --accent-strong: #5b7bff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;
  background: var(--surface-bg);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s ease, color 0.3s ease;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  margin: 0 -32px;
  padding: 20px 32px;
  background: var(--topbar-bg);
  backdrop-filter: blur(8px);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-link {
  transition: opacity 0.2s ease;
}

.brand-link:hover {
  opacity: 0.7;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--brand-white);
  border-radius: 8px;
  padding: 5px;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 20px;
}

.hero-logo-dark {
  display: none;
}

:root[data-theme='dark'] .hero-logo-light {
  display: none;
}

:root[data-theme='dark'] .hero-logo-dark {
  display: block;
}

.hero h1 {
  font-size: clamp(48px, 9vw, 96px);
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
}

.tagline {
  margin-top: 16px;
  font-size: 18px;
  color: var(--text-secondary);
}

.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.6;
  transition: opacity 0.4s ease;
}

.scroll-hint.hidden {
  opacity: 0;
  pointer-events: none;
}

.reveal {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.dir-left {
  transform: translateX(-48px);
}

.reveal.dir-right {
  transform: translateX(48px);
}

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

.story {
  padding: 100px 0;
}

.story-line {
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 600;
  margin: 0 0 120px;
}

.story-line:last-child {
  margin-bottom: 0;
  color: var(--text-secondary);
}

.products {
  padding: 0 0 100px;
}

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

.card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  padding: 20px 24px;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.card:hover {
  border-color: var(--accent);
  background: var(--surface-card-raised);
  transform: translateY(-2px);
}

.card-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--brand-white);
  border-radius: 9px;
  padding: 7px;
  flex-shrink: 0;
}

.card-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card h3 {
  margin: 0;
  font-size: 18px;
  flex: 1;
}

.card-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-strong);
  white-space: nowrap;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 32px 40px;
  border-top: 1px solid var(--surface-border);
  color: var(--text-secondary);
  font-size: 13px;
}

.site-footer span:first-child {
  color: var(--text-primary);
  font-weight: 700;
}

.theme-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
}

.theme-toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 108px;
  height: 40px;
  padding: 0 12px;
  border-radius: 20px;
  border: 1px solid var(--surface-border);
  background: var(--brand-black);
  color: var(--brand-white);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

:root[data-theme='dark'] .theme-toggle-switch {
  background: var(--brand-white);
  color: var(--brand-black);
}

.theme-toggle-switch .knob {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-white);
  transition: transform 0.3s ease, background 0.3s ease;
}

:root[data-theme='dark'] .theme-toggle-switch .knob {
  background: var(--brand-black);
  transform: translateX(68px);
}

.theme-toggle-switch .toggle-label {
  margin-left: 38px;
  transition: margin 0.3s ease;
}

:root[data-theme='dark'] .theme-toggle-switch .toggle-label {
  margin-left: 0;
}
