/* ==========================================================================
   Linko Official Website — Pure Google Material You (Material Design 3)
   Authentic M3 Color System, Tonal Elevation, Shapes, and Components
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=JetBrains+Mono:wght@400;500;600&family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0&display=swap');

:root {
  /* Material Design 3 — Indigo Light Palette */
  --md-sys-color-primary: #3f51b5;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #e0e0ff;
  --md-sys-color-on-primary-container: #000d60;

  --md-sys-color-secondary: #5b5d72;
  --md-sys-color-on-secondary: #ffffff;
  --md-sys-color-secondary-container: #e0e1f9;
  --md-sys-color-on-secondary-container: #181a2c;

  --md-sys-color-tertiary: #77536d;
  --md-sys-color-on-tertiary: #ffffff;
  --md-sys-color-tertiary-container: #ffd7f3;
  --md-sys-color-on-tertiary-container: #2d1228;

  --md-sys-color-surface: #fbf8ff;
  --md-sys-color-surface-dim: #dbd9e0;
  --md-sys-color-surface-container-lowest: #ffffff;
  --md-sys-color-surface-container-low: #f5f2fa;
  --md-sys-color-surface-container: #efedf4;
  --md-sys-color-surface-container-high: #e9e7ef;
  --md-sys-color-surface-container-highest: #e3e1e9;

  --md-sys-color-on-surface: #1a1b21;
  --md-sys-color-on-surface-variant: #46464f;
  --md-sys-color-outline: #767680;
  --md-sys-color-outline-variant: #c7c5d0;

  --md-shape-corner-xs: 4px;
  --md-shape-corner-sm: 8px;
  --md-shape-corner-md: 12px;
  --md-shape-corner-lg: 16px;
  --md-shape-corner-xl: 24px;
  --md-shape-corner-full: 9999px;

  --font-main: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --container-width: 1140px;
  --transition-fast: 0.2s cubic-bezier(0.2, 0, 0, 1);
  --transition-normal: 0.3s cubic-bezier(0.2, 0, 0, 1);
}

html.dark {
  /* Material Design 3 — Indigo Dark Palette (Matching App Dark Theme) */
  --md-sys-color-primary: #bec2ff;
  --md-sys-color-on-primary: #001c9b;
  --md-sys-color-primary-container: #25379d;
  --md-sys-color-on-primary-container: #e0e0ff;

  --md-sys-color-secondary: #c4c5dd;
  --md-sys-color-on-secondary: #2d2f42;
  --md-sys-color-secondary-container: #434559;
  --md-sys-color-on-secondary-container: #e0e1f9;

  --md-sys-color-tertiary: #e6bad7;
  --md-sys-color-on-tertiary: #45263d;
  --md-sys-color-tertiary-container: #5d3c54;
  --md-sys-color-on-tertiary-container: #ffd7f3;

  --md-sys-color-surface: #121318;
  --md-sys-color-surface-dim: #121318;
  --md-sys-color-surface-container-lowest: #0d0e13;
  --md-sys-color-surface-container-low: #1a1b21;
  --md-sys-color-surface-container: #1f1f25;
  --md-sys-color-surface-container-high: #292a30;
  --md-sys-color-surface-container-highest: #34343b;

  --md-sys-color-on-surface: #e3e1e9;
  --md-sys-color-on-surface-variant: #c7c5d0;
  --md-sys-color-outline: #90909a;
  --md-sys-color-outline-variant: #46464f;
}

/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.text-center { text-align: center; }
.accent { color: var(--md-sys-color-primary); }
.text-muted { color: var(--md-sys-color-on-surface-variant); }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 100px 0;
}

/* Material Symbols Helper */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
}

/* ==========================================================================
   Material 3 Buttons (Filled, Tonal, Outlined)
   ========================================================================== */
.m3-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 24px;
  border-radius: var(--md-shape-corner-full);
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.1px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: var(--transition-fast);
}

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

.m3-btn-lg {
  height: 48px;
  padding: 0 32px;
  font-size: 0.98rem;
  font-weight: 600;
}

.m3-btn-sm {
  height: 36px;
  padding: 0 18px;
  font-size: 0.85rem;
}

.m3-btn-filled {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.m3-btn-filled:hover {
  filter: brightness(1.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.m3-btn-tonal {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.m3-btn-tonal:hover {
  filter: brightness(0.95);
}

html.dark .m3-btn-tonal:hover {
  filter: brightness(1.1);
}

.m3-btn-outlined {
  background: transparent;
  border: 1px solid var(--md-sys-color-outline);
  color: var(--md-sys-color-primary);
}

.m3-btn-outlined:hover {
  background-color: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
}

/* ==========================================================================
   Material 3 Top App Bar
   ========================================================================== */
.top-app-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: color-mix(in srgb, var(--md-sys-color-surface) 90%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  z-index: 1000;
  height: 72px;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  display: flex;
  align-items: center;
}

.top-app-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 40px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--md-sys-color-on-surface);
}

.brand-link img {
  height: 36px;
  width: 36px;
  border-radius: var(--md-shape-corner-full);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 500;
  font-size: 0.92rem;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--md-sys-color-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.m3-icon-btn {
  background: transparent;
  border: none;
  color: var(--md-sys-color-on-surface-variant);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--md-shape-corner-full);
  transition: var(--transition-fast);
}

.m3-icon-btn:hover {
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
}

/* M3 Language Pill */
.lang-switcher {
  position: relative;
}

.m3-chip-btn {
  background-color: var(--md-sys-color-surface-container-high);
  border: 1px solid var(--md-sys-color-outline-variant);
  color: var(--md-sys-color-on-surface);
  padding: 6px 16px;
  border-radius: var(--md-shape-corner-sm);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  font-family: var(--font-main);
  transition: var(--transition-fast);
}

.m3-chip-btn:hover,
.m3-chip-btn.active {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  border-color: var(--md-sys-color-primary);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 200px;
  background-color: var(--md-sys-color-surface-container-high);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-shape-corner-md);
  padding: 6px;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  gap: 2px;
}

.lang-dropdown.show {
  display: flex;
}

.lang-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--md-shape-corner-sm);
  cursor: pointer;
  font-size: 0.88rem;
}

.lang-item:hover {
  background-color: var(--md-sys-color-surface-container-highest);
}

.lang-item.active {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  font-weight: 600;
}

/* ==========================================================================
   Hero Section (Material 3 Style)
   ========================================================================== */
.hero {
  padding-top: 150px;
  padding-bottom: 60px;
}

.m3-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--md-shape-corner-full);
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  max-width: 900px;
  margin: 0 auto 20px;
  letter-spacing: -1px;
}

.hero .subtitle {
  font-size: 1.2rem;
  color: var(--md-sys-color-on-surface-variant);
  max-width: 620px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 56px;
  flex-wrap: wrap;
}

/* Flutter App Window Mockup (M3 Tonal Container) */
.hero-visual {
  max-width: 620px;
  margin: 0 auto;
}

.m3-app-window {
  background-color: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-shape-corner-xl);
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  text-align: left;
}

.m3-window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  margin-bottom: 16px;
}

.m3-window-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--md-sys-color-on-surface);
}

.m3-window-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--md-sys-color-surface-container-high);
  padding: 4px 12px;
  border-radius: var(--md-shape-corner-full);
  font-size: 0.8rem;
  color: var(--md-sys-color-on-surface-variant);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--md-sys-color-primary);
}

.m3-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.m3-list-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--md-shape-corner-md);
  background-color: var(--md-sys-color-surface-container);
  border: 1px solid transparent;
  transition: var(--transition-fast);
}

.m3-list-tile.active {
  background-color: var(--md-sys-color-surface-container-high);
  border-color: var(--md-sys-color-primary);
}

.m3-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--md-shape-corner-full);
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  display: flex;
  align-items: center;
  justify-content: center;
}

.m3-tile-content {
  flex: 1;
}

.m3-tile-content .title {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--md-sys-color-on-surface);
}

.m3-tile-content .subtitle {
  font-size: 0.78rem;
  color: var(--md-sys-color-on-surface-variant);
}

.m3-chip {
  padding: 4px 12px;
  border-radius: var(--md-shape-corner-full);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
  background-color: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface-variant);
}

.m3-chip.highlight {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

/* ==========================================================================
   Stats Bar (Material 3 Tonal Card)
   ========================================================================== */
.stats-container {
  background-color: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-shape-corner-xl);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 32px 16px;
  text-align: center;
}

.stat-item {
  padding: 0 16px;
}

.stat-item:not(:last-child) {
  border-right: 1px solid var(--md-sys-color-outline-variant);
}

.stat-value {
  display: block;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--md-sys-color-primary);
  font-family: var(--font-mono);
}

.stat-label {
  display: block;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* ==========================================================================
   Features Section (Material 3 Elevated Cards)
   ========================================================================== */
.section-header {
  margin-bottom: 48px;
}

.m3-section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--md-sys-color-primary);
  margin-bottom: 8px;
}

.section-title {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.section-subtitle {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.m3-card {
  background-color: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-shape-corner-xl);
  padding: 28px 24px;
  text-align: center;
  transition: var(--transition-fast);
}

.m3-card:hover {
  background-color: var(--md-sys-color-surface-container);
  border-color: var(--md-sys-color-primary);
  transform: translateY(-3px);
}

.m3-card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--md-shape-corner-md);
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.m3-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.m3-card p {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ==========================================================================
   How It Works (M3 Workflow Cards)
   ========================================================================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.m3-step-card {
  background-color: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-shape-corner-xl);
  padding: 32px 24px;
  text-align: center;
}

.m3-step-num {
  width: 44px;
  height: 44px;
  border-radius: var(--md-shape-corner-full);
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 auto 20px;
  font-family: var(--font-mono);
}

.m3-step-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.m3-step-card p {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.92rem;
}

/* ==========================================================================
   Downloads Section (Material 3 Segmented Control & Download Cards)
   ========================================================================== */
.m3-segmented-control {
  display: inline-flex;
  background-color: var(--md-sys-color-surface-container-highest);
  border-radius: var(--md-shape-corner-full);
  padding: 4px;
  margin-bottom: 36px;
}

.m3-segment-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  border-radius: var(--md-shape-corner-full);
  border: none;
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.m3-segment-btn.active {
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.download-tab-pane {
  display: none;
}

.download-tab-pane.active {
  display: block;
}

.m3-downloads-panel {
  background-color: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-shape-corner-xl);
  padding: 36px;
  max-width: 860px;
  margin: 0 auto;
}

.m3-panel-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  margin-bottom: 24px;
}

.m3-panel-header .platform-icon {
  font-size: 36px;
  padding: 12px;
  border-radius: var(--md-shape-corner-md);
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

.m3-panel-header h3 {
  font-size: 1.25rem;
  color: var(--md-sys-color-on-surface);
}

.m3-panel-header p {
  font-size: 0.88rem;
  color: var(--md-sys-color-on-surface-variant);
}

.m3-download-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.m3-download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-radius: var(--md-shape-corner-lg);
  background-color: var(--md-sys-color-surface-container);
  border: 1px solid var(--md-sys-color-outline-variant);
  transition: var(--transition-fast);
}

.m3-download-card:hover {
  background-color: var(--md-sys-color-surface-container-high);
  border-color: var(--md-sys-color-primary);
  transform: translateY(-2px);
}

.m3-download-card.highlight {
  background-color: color-mix(in srgb, var(--md-sys-color-primary-container) 40%, var(--md-sys-color-surface-container));
  border-color: var(--md-sys-color-primary);
}

.m3-download-card .title-area {
  display: flex;
  flex-direction: column;
}

.m3-download-card .name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--md-sys-color-on-surface);
}

.m3-download-card .spec {
  font-size: 0.78rem;
  color: var(--md-sys-color-on-surface-variant);
  font-family: var(--font-mono);
  margin-top: 4px;
}

.m3-download-card .dl-icon {
  color: var(--md-sys-color-primary);
  font-size: 24px;
}

/* ==========================================================================
   FAQ Section (Material 3 Expansion Rows)
   ========================================================================== */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
}

.m3-faq-card {
  background-color: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-shape-corner-lg);
  padding: 24px;
  text-align: left;
}

.m3-faq-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--md-sys-color-on-surface);
}

.m3-faq-card p {
  font-size: 0.9rem;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.55;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--md-sys-color-outline-variant);
  padding: 60px 0 32px;
  margin-top: 60px;
  background-color: var(--md-sys-color-surface-container-low);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand p {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.9rem;
  margin-top: 12px;
}

.footer-links-group {
  display: flex;
  gap: 60px;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--md-sys-color-on-surface);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.88rem;
}

.footer-col a:hover {
  color: var(--md-sys-color-primary);
}

.footer-bottom {
  border-top: 1px solid var(--md-sys-color-outline-variant);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--md-sys-color-on-surface-variant);
}

/* Responsive */
@media (max-width: 900px) {
  .nav-left { gap: 24px; }
  .nav-links { gap: 20px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
  .stats-container { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .stat-item:not(:last-child) { border-right: none; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .grid-4 { grid-template-columns: 1fr; }
  .stats-container { grid-template-columns: 1fr; }
  .m3-downloads-panel { padding: 24px 16px; }
  .footer-grid { flex-direction: column; }
  .footer-links-group { flex-direction: column; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}
