/* ==========================================================================
   AKeyUP Premium Theme Engine - Design Tokens & Variables
   ========================================================================== */
:root {
  --bg-main: #0d0d0d;
  --bg-box: linear-gradient(145deg, #161616, #121212);
  --bg-card-hover: rgba(255, 68, 68, 0.05);
  --bg-input: #111;
  --bg-menu-btn: rgba(20, 20, 20, 0.8);
  --border-color: #262626;
  --border-box: #222;
  --border-interactive: #333;
  --text-main: #e5e5e5;
  --text-inverse: #ffffff;
  --text-muted: #888;
  --text-light: #b3b3b3;
  --text-card: #bbb;
  --menu-shadow: rgba(0, 0, 0, 0.6);
  --title-gradient: linear-gradient(135deg, #ffffff 0%, #a3a3a3 100%);
}

[data-theme="light"] {
  --bg-main: #f5f5f7;
  --bg-box: linear-gradient(145deg, #ffffff, #fafafa);
  --bg-card-hover: rgba(255, 68, 68, 0.03);
  --bg-input: #f0f0f2;
  --bg-menu-btn: rgba(255, 255, 255, 0.8);
  --border-color: #d1d1d6;
  --border-box: #e5e5ea;
  --border-interactive: #c7c7cc;
  --text-main: #1c1c1e;
  --text-inverse: #000000;
  --text-muted: #8e8e93;
  --text-light: #3a3a3c;
  --text-card: #48484a;
  --menu-shadow: rgba(0, 0, 0, 0.1);
  --title-gradient: linear-gradient(135deg, #1c1c1e 0%, #636366 100%);
}

/* ==========================================================================
   Core Reset
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg-main);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Base Wrapper & Structure */
.wrapper {
  padding: clamp(30px, 6vw, 80px) 20px;
  max-width: 1000px;
  margin: auto;
}

.wrapper-narrow {
  max-width: 850px;
}

/* ==========================================================================
   Typography & Typography Utilities
   ========================================================================== */
header, .page-header {
  text-align: center;
  margin-bottom: clamp(40px, 8vw, 60px);
}

.title {
  font-size: clamp(2.5rem, 7vw, 4rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 12px;
  background: var(--title-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--text-muted);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  max-width: 600px;
  margin: 0 auto;
}

/* Section Headings */
h2.section-title {
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-inverse);
  border-left: 4px solid #ff4444;
  padding-left: 15px;
  text-align: left;
}

/* ==========================================================================
   Components: Cards, Layouts & Content Containers
   ========================================================================== */
/* Grid Containers */
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

/* Simple Info Card */
.card {
  background: var(--bg-box);
  padding: clamp(20px, 4vw, 30px);
  border-radius: 16px;
  border: 1px solid var(--border-box);
  text-align: center;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-card);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card:hover {
  border-color: #ff4444;
  transform: translateY(-4px);
  color: var(--text-inverse);
  box-shadow: 0 10px 25px var(--bg-card-hover);
}

/* Document Container (Legal, Privacy, Form Boxes) */
.content-box {
  background: var(--bg-box);
  border: 1px solid var(--border-box);
  padding: clamp(25px, 5vw, 45px);
  border-radius: 20px;
  box-shadow: 0 15px 35px var(--menu-shadow);
  margin-bottom: 40px;
  transition: background 0.3s ease, border 0.3s ease, box-shadow 0.3s ease;
}

/* Content Box Interior Blocks */
.content-section {
  margin-bottom: 35px;
}

.content-section:last-child {
  margin-bottom: 0;
}

.content-section h2 {
  font-size: clamp(1.2rem, 3vw, 1.45rem);
  color: #ff4444;
  margin-bottom: 12px;
  font-weight: 700;
}

.content-section p {
  color: var(--text-light);
  font-size: clamp(0.95rem, 2vw, 1.05rem);
}

/* Links within text elements */
.text-link {
  color: #ff4444;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.text-link:hover {
  color: #e03333;
  text-decoration: underline;
}

/* ==========================================================================
   Buttons & Interactive Actions
   ========================================================================== */
.btn-container {
  text-align: center;
  margin: 40px 0;
}

.btn {
  display: inline-block;
  padding: 14px 35px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Accent Button (Call to Action / Core Operations) */
.btn-accent {
  background: #ff4444;
  color: white;
  box-shadow: 0 4px 15px rgba(255, 68, 68, 0.2);
}

.btn-accent:hover {
  background: #e03333;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 68, 68, 0.4);
}

/* Neutral Button (Back Navigation / Secondary Actions) */
.btn-neutral {
  background: transparent;
  border: 1px solid var(--border-interactive);
  color: var(--text-muted);
}

.btn-neutral:hover {
  background: var(--bg-input);
  color: var(--text-inverse);
  border-color: var(--text-muted);
}

/* ==========================================================================
   Navigation Dropdown Menu Component
   ========================================================================== */
.menu-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

.menu-btn {
  font-size: 22px;
  width: 45px;
  height: 45px;
  border: 1px solid var(--border-interactive);
  border-radius: 50%;
  background: var(--bg-menu-btn);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-inverse);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.menu-btn:hover {
  background: var(--bg-input);
  border-color: var(--text-muted);
}

.menu {
  display: none;
  margin-top: 10px;
  background: var(--bg-box);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  min-width: 180px;
  position: absolute;
  right: 0;
  box-shadow: 0 10px 25px var(--menu-shadow);
}

.menu.show {
  display: block;
}

.menu a {
  display: block;
  padding: 12px 20px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.95rem;
  text-align: left;
  transition: all 0.2s;
}

.menu a:hover {
  background: #ff4444;
  color: white;
  padding-left: 24px;
}

/* ==========================================================================
   Footer Component
   ========================================================================== */
footer, .page-footer {
  text-align: center;
  padding: 40px 0 20px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-box);
  margin-top: 60px;
}