/* Board Developer Portal Styles */

/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&display=swap');

@font-face {
  font-family: 'ITC Kabel';
  src: url('../fonts/itc-kabel_ultra.woff2') format('woff2'),
       url('../fonts/itc-kabel_ultra.woff') format('woff');
  font-weight: 900;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: 'Neue Haas Grotesk Text';
  src: url('../fonts/NeueHaasGroteskText-55Roman-Web.woff2') format('woff2'),
       url('../fonts/NeueHaasGroteskText-55Roman-Web.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: 'Neue Haas Grotesk Text';
  src: url('../fonts/NeueHaasGroteskText-65Medium-Web.woff2') format('woff2'),
       url('../fonts/NeueHaasGroteskText-65Medium-Web.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: 'Neue Haas Grotesk Text';
  src: url('../fonts/NeueHaasGroteskText-75Bold-Web.woff2') format('woff2'),
       url('../fonts/NeueHaasGroteskText-75Bold-Web.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: block;
}

/* Design Tokens */
:root {
  --bg-color: #fffef1;
  --text-color: #000000;
  --accent-color: #32c992;
  --purple: #6d13ec;
  --border-color: rgba(0, 0, 0, 0.15);
  --code-bg: rgba(0, 0, 0, 0.05);
  --secondary-text: rgba(0, 0, 0, 0.5);
  --disabled-color: rgba(0, 0, 0, 0.3);

  --font-heading: 'ITC Kabel', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Neue Haas Grotesk Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-code: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
}

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

/* Base */
html {
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  padding: 20px 40px;
  border-bottom: 1px solid var(--border-color);
}

header a {
  text-decoration: none;
}

header .logo {
  height: 35px;
  width: auto;
}

/* Main Content */
main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 60px 40px;
}

.container {
  width: 100%;
  max-width: 800px;
}

/* Typography */
h1 {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 54px;
  line-height: 1.1;
  letter-spacing: -2.16px;
  color: var(--text-color);
  margin: 0 0 24px 0;
}

h2 {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: -1.44px;
  color: var(--text-color);
  margin: 40px 0 24px 0;
}

h3 {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -1.12px;
  color: var(--text-color);
  margin: 32px 0 16px 0;
}

p {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-color);
  margin: 0 0 16px 0;
}

.lead {
  font-size: 20px;
  color: var(--secondary-text);
  margin-bottom: 32px;
}

a {
  color: var(--purple);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Checkbox Agreement */
.agreement {
  margin: 40px 0;
  padding: 24px;
  background: var(--code-bg);
  border-radius: 12px;
}

.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--accent-color);
}

.checkbox-wrapper label {
  font-size: 18px;
  line-height: 1.5;
  cursor: pointer;
  user-select: none;
}

/* Download Sections */
.downloads {
  margin-top: 40px;
}

.download-section {
  margin-bottom: 40px;
}

.download-section h3 {
  margin-top: 0;
  margin-bottom: 16px;
}

.download-section h3 .version {
  font-family: var(--font-code);
  font-size: 14px;
  font-weight: 500;
  color: var(--secondary-text);
  background: var(--code-bg);
  padding: 4px 10px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 8px;
}

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

/* Download Buttons */
.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  background: var(--purple);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.download-btn:hover {
  opacity: 0.9;
  text-decoration: none;
}

.download-btn:disabled,
.download-btn.disabled {
  background: var(--disabled-color);
  cursor: not-allowed;
  pointer-events: none;
}

.download-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.download-btn.secondary {
  background: transparent;
  color: var(--purple);
  border: 2px solid var(--purple);
}

.download-btn.secondary:hover {
  background: rgba(109, 19, 236, 0.05);
}

.download-btn.secondary:disabled,
.download-btn.secondary.disabled {
  color: var(--disabled-color);
  border-color: var(--disabled-color);
  background: transparent;
}

.download-btn .btn-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.download-btn .btn-subtext {
  display: block;
  font-size: 12px;
  font-weight: 400;
  opacity: 0.7;
}

.download-btn:has(.btn-text) svg {
  width: 28px;
  height: 28px;
}

/* Model Downloads */
.model-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.model-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.model-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.model-name {
  font-weight: 500;
  font-size: 16px;
}

.model-version {
  font-family: var(--font-code);
  font-size: 12px;
  font-weight: 500;
  color: var(--secondary-text);
}

.model-desc {
  font-size: 14px;
  color: var(--secondary-text);
}

.model-item .download-btn {
  padding: 10px 16px;
  font-size: 14px;
}

/* Footer */
footer {
  background: var(--purple);
  margin: 0 20px;
  border-radius: 12px 12px 0 0;
  padding: 50px 40px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

footer .footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

footer .social-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

footer .social-links a {
  color: #fffef1;
  display: block;
  width: 24px;
  height: 24px;
  transition: opacity 0.15s ease;
}

footer .social-links a:hover {
  opacity: 0.8;
  text-decoration: none;
}

footer .social-links svg {
  width: 24px;
  height: 24px;
  fill: #fffef1;
}

footer .copyright {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  line-height: 19px;
  color: #fffef1;
  margin: 0;
}

footer .footer-logo {
  margin-top: 40px;
  width: 100%;
  max-width: 1360px;
}

footer .footer-logo svg {
  width: 100%;
  height: auto;
}

/* Responsive */
@media (max-width: 768px) {
  header {
    padding: 16px 24px;
  }

  main {
    padding: 40px 24px;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 28px;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .model-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .model-item .download-btn {
    width: 100%;
  }

  footer {
    margin: 0 12px;
    padding: 40px 24px 30px;
  }
}
