/* 
 * ==========================================================================
 * OVERFLOW DESIGN SYSTEM - "Blueprint Washed in Indigo"
 * Eduneed Indonesia - Layanan Parafrase & Editorial Tugas Akhir
 * 
 * Theme: Light
 * Canvas: Paper White (#fafafc), Alternate Section: Mist Gray (#f0f0f2)
 * Brand Ink: Midnight Ink (#161637) for headings, wordmark, key emphasis
 * Supporting Accent: Sky Accent (#0085e4) for small details and links
 * Primary Action: Onyx (#000000) filled button with Paper White (#fafafc) text
 * Neutral Body: Graphite (#666666)
 * Borders: Hairline (#dadce0) at 1px
 * Hero Atmosphere: Indigo Wash (linear-gradient(127deg, #7272fb 0%, #b8e1ff 99%))
 * Punctuation Card: Signal Blue (linear-gradient(90deg, #007bff 0%, #62aeff 100%))
 * Typography: Pure Inter single-family system with tight -0.025em tracking
 * Radii: 24px cards & product frames, 12px buttons & nav, 8px inputs
 * Elevation: Low-opacity shadows barely registering (<= rgba(0,0,0,0.08))
 * ==========================================================================
 */

:root {
  /* Colors */
  --color-midnight-ink: #161637;
  --color-sky-accent: #0085e4;
  --color-onyx: #000000;
  --color-paper-white: #fafafc;
  --color-mist-gray: #f0f0f2;
  --color-graphite: #666666;
  --color-hairline: #dadce0;
  --color-indigo-wash: #7272fb;
  --gradient-indigo-wash: linear-gradient(127deg, #7272fb 0%, #b8e1ff 99%);
  --color-signal-blue: #007bff;
  --gradient-signal-blue: linear-gradient(90deg, #007bff 0%, #62aeff 100%);

  /* Backward-compatible aliases */
  --color-deep-teal: #161637;
  --color-bright-teal: #0085e4;
  --color-ink: #161637;
  --color-midnight-teal: #161637;
  --color-mist: #666666;
  --color-paper: #fafafc;
  --color-cream: #f0f0f2;
  --color-canvas: #fafafc;
  --color-cloud: #f0f0f2;
  --color-rule: #dadce0;
  --color-border: #dadce0;
  --color-slate-body: #666666;

  /* Typography - Font Families (100% Pure Inter) */
  --font-inter: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: var(--font-inter);
  --font-body: var(--font-inter);
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;

  /* Typography - Scale */
  --text-caption: 12px;
  --leading-caption: 1.5;
  --tracking-caption: 0.071px;
  --text-body-sm: 14px;
  --leading-body-sm: 1.57;
  --tracking-body-sm: -0.08px;
  --text-subheading: 20px;
  --leading-subheading: 1.42;
  --tracking-subheading: -0.24px;
  --text-heading-sm: 24px;
  --leading-heading-sm: 1.33;
  --tracking-heading-sm: -0.4px;
  --text-heading: 32px;
  --leading-heading: 1.25;
  --tracking-heading: -0.6px;
  --text-heading-lg: 48px;
  --leading-heading-lg: 1.14;
  --tracking-heading-lg: -1px;
  --text-display: 56px;
  --leading-display: 1.07;
  --tracking-display: -1.4px;

  /* Typography - Weights */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-w550: 550;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* Spacing */
  --spacing-4: 4px;
  --spacing-8: 8px;
  --spacing-12: 12px;
  --spacing-16: 16px;
  --spacing-20: 20px;
  --spacing-24: 24px;
  --spacing-32: 32px;
  --spacing-40: 40px;
  --spacing-56: 56px;
  --spacing-60: 60px;
  --spacing-64: 64px;
  --spacing-72: 72px;
  --spacing-96: 96px;
  --spacing-128: 128px;
  --spacing-156: 156px;
  --spacing-160: 160px;

  /* Layout */
  --page-max-width: 1200px;
  --section-gap: 100px;
  --card-padding: 32px;
  --element-gap: 16px;

  /* Border Radius */
  --radius-nav: 12px;
  --radius-cards: 24px;
  --radius-pills: 9999px;
  --radius-inputs: 8px;
  --radius-buttons: 12px;
  --radius-product-frame: 24px;
  --radius-card: 24px;
  --radius-btn: 12px;
  --radius-pill: 9999px;

  /* Shadows (Subtle elevation <= 0.08 opacity) */
  --shadow-md: rgba(0, 0, 0, 0.08) 0px 4px 16px -8px;
  --shadow-lg: rgba(0, 0, 0, 0.08) 0px 8px 20px -7px;
  --shadow-card: rgba(0, 0, 0, 0.08) 0px 4px 16px -8px;
  --shadow-product: rgba(0, 0, 0, 0.08) 0px 8px 20px -7px;

  /* Surfaces */
  --surface-page-canvas: #fafafc;
  --surface-alt-section: #f0f0f2;
  --surface-card-surface: #fafafc;
  --surface-dark-surface: #000000;
}

/* ==========================================================================
   GLOBAL RESET & BASE TYPOGRAPHY
   ========================================================================== */
html, body {
  overflow-x: clip;
  max-width: 100%;
}

body {
  font-family: var(--font-inter);
  background-color: var(--color-paper-white);
  color: var(--color-onyx);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings: Tight negative tracking Inter */
h1, h2, h3, h4, h5, h6, .font-display {
  font-family: var(--font-inter) !important;
  color: var(--color-midnight-ink);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

.text-display-overflow {
  font-size: clamp(34px, 5vw, 56px);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  font-weight: 700;
}

.text-heading-lg-overflow {
  font-size: clamp(28px, 4vw, 48px);
  line-height: var(--leading-heading-lg);
  letter-spacing: var(--tracking-heading-lg);
  font-weight: 700;
}

.text-heading-overflow {
  font-size: clamp(22px, 3vw, 32px);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
  font-weight: 700;
}

.text-heading-sm-overflow {
  font-size: clamp(18px, 2.5vw, 24px);
  line-height: var(--leading-heading-sm);
  letter-spacing: var(--tracking-heading-sm);
  font-weight: 700;
}

.text-subheading-overflow {
  font-size: clamp(16px, 2vw, 20px);
  line-height: var(--leading-subheading);
  letter-spacing: var(--tracking-subheading);
}

.text-body-sm-overflow {
  font-size: var(--text-body-sm);
  line-height: var(--leading-body-sm);
  letter-spacing: var(--tracking-body-sm);
}

.font-mono {
  font-family: var(--font-mono);
}

/* ==========================================================================
   BUTTON ARCHETYPE: DARK FILLED (PRIMARY) & GHOST (SECONDARY)
   ========================================================================== */

/* Dark Filled Button - The ONLY maximum contrast element */
.btn-dark-filled, .btn-primary-overflow, .btn-volt, .btn-teal {
  background-color: var(--color-onyx);
  color: var(--color-paper-white) !important;
  border-radius: var(--radius-buttons);
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.16s ease-in-out;
  border: 1px solid transparent;
  box-shadow: none;
  text-decoration: none;
}
.btn-dark-filled:hover, .btn-primary-overflow:hover, .btn-volt:hover, .btn-teal:hover {
  background-color: #1f1f2e;
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* Ghost / Outlined Button - Steps back from Dark Filled */
.btn-ghost-overflow, .btn-ghost, .btn-outlined {
  background-color: var(--color-paper-white);
  color: var(--color-onyx) !important;
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-buttons);
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.16s ease-in-out;
  text-decoration: none;
}
.btn-ghost-overflow:hover, .btn-ghost:hover, .btn-outlined:hover {
  border-color: var(--color-midnight-ink);
  background-color: #ffffff;
  color: var(--color-midnight-ink) !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   HERO GRADIENT BANNER & MACOS PRODUCT WINDOW FRAME
   ========================================================================== */

/* Hero Atmosphere: Indigo Wash (Lavender fading to pale sky blue at 127deg) */
.hero-overflow-wash {
  background: var(--gradient-indigo-wash);
}

/* macOS Product Window Frame - Signature Overflow Chrome */
.macos-window-frame {
  background-color: #ffffff;
  border-radius: var(--radius-product-frame);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.7);
  overflow: hidden;
  position: relative;
}

.macos-chrome-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background-color: #ffffff;
  border-bottom: 1px solid var(--color-hairline);
}

.macos-traffic-dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.macos-dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  display: inline-block;
}
.macos-dot-red { background-color: #ff5f56; }
.macos-dot-yellow { background-color: #ffbd2e; }
.macos-dot-green { background-color: #27c93f; }

.macos-file-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-graphite);
  letter-spacing: -0.05px;
  font-family: var(--font-inter);
}

/* ==========================================================================
   CARDS & SURFACES (24px Radius, 32px Padding, Hairline 1px)
   ========================================================================== */

/* Feature Card - 3 Column Grid Item */
.overflow-card, .hallmark-card {
  background-color: var(--color-paper-white);
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-cards);
  padding: var(--card-padding);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-shadow: var(--shadow-md);
}
.overflow-card:hover, .hallmark-card:hover {
  border-color: #c7cbd3;
  box-shadow: var(--shadow-lg);
}

/* Color Accent Card - Signal Blue Gradient (Used once per row to break rhythm) */
.card-signal-blue {
  background: var(--gradient-signal-blue) !important;
  color: #ffffff !important;
  border: 1px solid transparent !important;
  border-radius: var(--radius-cards) !important;
  padding: var(--card-padding) !important;
  box-shadow: var(--shadow-lg) !important;
}
.card-signal-blue h2, .card-signal-blue h3, .card-signal-blue p, .card-signal-blue span {
  color: #ffffff !important;
}
.card-signal-blue .btn-card-action {
  background-color: #ffffff !important;
  color: #007bff !important;
  font-weight: 600;
  border-radius: var(--radius-buttons);
}
.card-signal-blue .btn-card-action:hover {
  background-color: #f0f7ff !important;
}

/* Section Alternate Surface */
.surface-alt {
  background-color: var(--color-mist-gray);
}

/* Section Spacing: Generous 80–120px */
.section-overflow {
  padding-top: clamp(60px, 8vw, 100px);
  padding-bottom: clamp(60px, 8vw, 100px);
}

/* Section Heading Block: Flush Left, tight tracking */
.section-heading-block {
  text-align: left;
  margin-bottom: 48px;
}
.section-heading-block h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.8px;
  font-weight: 700;
  color: var(--color-midnight-ink);
  margin-bottom: 12px;
}
.section-heading-block p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-graphite);
  max-width: 680px;
}

/* ==========================================================================
   TEXT INPUTS & FORM FIELDS (8px Radius, Mist Gray Background)
   ========================================================================== */
.input-overflow {
  border-radius: var(--radius-inputs);
  background-color: var(--color-mist-gray);
  border: 1px solid transparent;
  color: var(--color-midnight-ink);
  padding: 12px 16px;
  font-size: 15px;
  font-family: var(--font-inter);
  transition: all 0.15s ease;
  width: 100%;
}
.input-overflow::placeholder {
  color: var(--color-graphite);
}
.input-overflow:focus {
  outline: none;
  border-color: var(--color-midnight-ink);
  background-color: #ffffff;
}

/* ==========================================================================
   PILL BADGES (9999px Radius, Strictly for Status/Tags)
   ========================================================================== */
.overflow-pill, .hallmark-badge {
  border-radius: var(--radius-pills);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.071px;
}
.pill-neutral, .badge-neutral {
  background-color: var(--color-mist-gray);
  border: 1px solid var(--color-hairline);
  color: var(--color-midnight-ink);
}
.pill-blue, .badge-teal, .badge-violet {
  background-color: #e8f4fc;
  border: 1px solid #c2e2f8;
  color: var(--color-sky-accent);
}
.pill-green, .badge-green {
  background-color: #eafaf1;
  border: 1px solid #b8ebcd;
  color: #1a7f45;
}
.pill-red, .badge-red {
  background-color: #fdeeee;
  border: 1px solid #f9c7c7;
  color: #b3261e;
}

/* ==========================================================================
   UNIVERSITY LOGO BAR (60-70% Opacity Onyx)
   ========================================================================== */
.logo-bar-overflow {
  padding-top: 48px;
  padding-bottom: 48px;
  text-align: center;
}
.logo-bar-caption {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-graphite);
  margin-bottom: 32px;
  text-align: center;
}
.logo-bar-item img {
  filter: grayscale(100%);
  opacity: 0.65;
  transition: opacity 0.2s ease, filter 0.2s ease;
}
.logo-bar-item img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* ==========================================================================
   FAQ ACCORDION & REVEAL SYSTEM
   ========================================================================== */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  opacity: 0;
}
.faq-item {
  transition: border-color 0.2s ease, background-color 0.2s ease;
  border-radius: var(--radius-cards);
}
.faq-item.active {
  border-color: #b8bcc8;
  background-color: #ffffff;
}
.faq-item.active .faq-answer {
  max-height: 320px;
  opacity: 1;
  padding-top: 14px;
}
.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* Top Progress Scroll Indicator */
#scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2.5px;
  background: var(--color-sky-accent);
  transform: scaleX(0);
  transform-origin: 0 0;
  z-index: 9999;
  pointer-events: none;
  will-change: transform;
}

/* Reveal-on-scroll */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-on-scroll { opacity: 1 !important; transform: none !important; transition: none !important; }
  #scroll-progress-bar { display: none !important; }
}

/* Focus Ring */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--color-sky-accent);
  outline-offset: 2px;
}
