/* =======================================================
   Itemba | Arctic Enhanced UI — style.css (v2.3 PROD)
   Author: Arcta Studio
   Strategy: Mobile & Tablet First, Performance-lean, A11y-safe
   ======================================================= */


/* === Root Variables === */
:root {
  /* Palette */
  --primary: #00cfff;
  --primary-dark: #0085ff;
  --primary-light: #d6f2ff;
  --secondary: #002b45;
  --accent: #00ffaa;
  --danger: #ff4d4d;

  --dark: #081e2c;
  --light: #eafaff;
  --white: #ffffff;
  --black: #000000;
  --gray: #6c757d;
  --gray-700: #455463;
  --gray-light: #cbd9e3;

  /* Backgrounds */
  --bg-body: linear-gradient(to bottom, #001d2e 0%, #003a5e 50%, #00cfff 100%);
  --bg-elev: rgba(255, 255, 255, 0.10);
  --bg-elev-strong: rgba(0, 43, 69, 0.65);

  /* Text */
  --text-primary: #f0faff;
  --text-secondary: #cceeff;
  --text-light: #e0f7ff;
  --text-muted: #b3eaff;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.12);
  --shadow: 0 2px 8px rgba(0,0,0,0.18);
  --shadow-lg: 0 8px 24px rgba(0, 207, 255, 0.25);
  --glow: 0 0 12px rgba(0, 207, 255, 0.45);

  /* Borders */
  --radius: 12px;
  --radius-lg: 16px;
  --border: rgba(255,255,255,0.10);

  /* Typography */
  --font-main: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
  --size-100: 0.875rem;
  --size-200: 0.9375rem;
  --size-300: 1rem;
  --size-400: 1.125rem;
  --size-500: 1.25rem;
  --size-600: 1.5rem;

  --lh-tight: 1.25;
  --lh-base: 1.5;

  /* Container */
  --container-pad: 1rem;
  --container-max: 1200px;

  /* Transition */
  --t-fast: 150ms;
  --t-mid: 250ms;
}


/* === Base Reset === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-main);
  font-size: var(--size-300);
  line-height: var(--lh-base);
  color: var(--text-primary);
  background: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100svh;
  overscroll-behavior-y: none;
}


/* === Typography === */
h1, h2, h3, h4, h5 {
  color: var(--text-light);
  font-weight: 700;
  line-height: var(--lh-tight);
  margin: 0 0 0.75rem;
  letter-spacing: 0.2px;
}

h1 { font-size: var(--size-600); }
h2 { font-size: var(--size-500); }
h3 { font-size: var(--size-400); }

p {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: var(--size-200);
  text-align: justify;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--t-fast) ease;
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}


/* === Container & Section === */
.container {
  width: 100%;
  padding-inline: var(--container-pad);
  margin-inline: auto;
  max-width: 100%;
}

.section {
  padding: 1.25rem 0;
  content-visibility: auto;
  contain-intrinsic-size: 600px;
}


/* === Cards / Panels === */
.card,
.panel {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-mid) ease, box-shadow var(--t-mid) ease, background var(--t-fast);
}


/* === Hero Section === */
.hero {
  position: relative;
  min-height: 70svh;
  display: grid;
  place-items: center;
  text-align: center;
  background: #001825 url('/projects/itemba/assets/site/hero.jpg') center/cover no-repeat;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 92%;
  margin-inline: auto;
  padding: 1rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}


/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
  background: var(--primary);
  color: var(--dark);
  transition: background var(--t-fast) ease, color var(--t-fast) ease, box-shadow var(--t-fast) ease, transform var(--t-fast) ease;
  cursor: pointer;
}

.btn:hover {
  background: var(--primary-dark);
  color: var(--white);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

/* Variants */
.btn--secondary { background: var(--secondary); color: var(--light); }
.btn--ghost { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn--outline { background: transparent; color: var(--text-primary); border: 1px solid var(--border); }
.btn--danger { background: var(--danger); color: var(--white); }


/* === Navigation === */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem var(--container-pad);
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 24, 37, 0.6);
  border-bottom: 1px solid var(--border);
  backdrop-filter: none;
}

.nav__brand {
  font-weight: 700;
  color: var(--text-light);
  font-size: var(--size-400);
}

.nav__toggle {
  background: transparent;
  border: 0;
  color: var(--text-light);
  font-size: 1.25rem;
  min-height: 44px;
  min-width: 44px;
}

.nav__menu {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 0;
}

.nav__menu.is-open {
  display: flex;
}

.nav__link {
  color: var(--text-secondary);
  padding: 0.5rem 0.25rem;
}

.nav__link:hover {
  color: var(--accent);
}


/* === Forms === */
input,
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
  transition: border-color var(--t-fast) ease, background var(--t-fast);
  accent-color: var(--primary);
}

input::placeholder,
textarea::placeholder {
  color: var(--gray-light);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,207,255,0.25);
}

label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-secondary);
  font-size: var(--size-200);
}

.form-row {
  display: grid;
  gap: 0.75rem;
}


/* === Media === */
img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

.img-fluid { width: 100%; height: auto; }
.ratio-16x9 { aspect-ratio: 16 / 9; object-fit: cover; }
.ratio-1x1 { aspect-ratio: 1 / 1; object-fit: cover; }


/* === Skeleton Loader === */
.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}


/* === Animations === */
@keyframes fadeUp {
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.fade-up {
  animation: fadeUp 0.45s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}


/* === Footer === */
footer {
  background: #001e2e;
  color: var(--text-muted);
  padding: 1.25rem 1rem;
  text-align: center;
  font-size: var(--size-100);
  border-top: 1px solid var(--border);
}


/* === Utilities === */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }

.p-0  { padding: 0 !important; }
.p-1  { padding: 0.5rem !important; }
.p-2  { padding: 1rem !important; }
.p-3  { padding: 1.5rem !important; }

.text-center { text-align: center !important; }
.text-right  { text-align: right !important; }
.text-left   { text-align: left !important; }

.grid { display: grid; gap: 1rem; }
.flex { display: flex; gap: 0.75rem; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }


/* === Scrollbar Control === */
@media (max-width: 767.98px) {
  ::-webkit-scrollbar { width: 0; height: 0; }
}


/* === Tablet ≥768px === */
@media (min-width: 768px) {
  .container { max-width: 720px; padding-inline: 1.25rem; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  p  { font-size: var(--size-300); }

  .card, .panel { padding: 1.5rem; box-shadow: var(--shadow); }
  .hero { min-height: 80svh; }
  .hero-content { padding: 1.5rem; max-width: 640px; }
  .btn { padding: 0.85rem 1.35rem; }

  ::-webkit-scrollbar { width: 8px; }
  ::-webkit-scrollbar-thumb { background: var(--primary-dark); border-radius: 8px; }
  ::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }

  .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }

  @supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
    .nav, .card, .panel, .hero-content {
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      background: var(--bg-elev-strong);
    }
  }
}


/* === Desktop ≥1024px === */
@media (min-width: 1024px) {
  .container { max-width: var(--container-max); padding-inline: 2rem; }

  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }

  .card, .panel {
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
  }

  .card:hover, .panel:hover { transform: translateY(-3px); }

  .btn { padding: 1rem 1.5rem; box-shadow: var(--glow); }
  .btn:hover { box-shadow: 0 0 24px rgba(0,207,255,0.5); }

  .hero { min-height: 100svh; }
  .hero-content { max-width: 720px; padding: 2rem; background: rgba(255,255,255,0.06); }

  .nav__menu { display: flex !important; flex-direction: row; gap: 1rem; padding: 0; }
  .nav__toggle { display: none; }
}
