/* ==========================================================================
   Vyoma Pocket — Base Styles, 120Hz Hardware Compositing & Animations
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-canvas);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

#view-container {
  flex: 1;
  animation: fluidViewEnter 220ms var(--ease);
  will-change: opacity, transform;
}

@keyframes fluidViewEnter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

p {
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.6;
}

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

button, input, select, textarea {
  font: inherit;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Dynamic Ambient Glow Blobs with GPU Acceleration */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(100px);
  opacity: 0.45;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}
.ambient-glow--1 {
  top: -10vw;
  right: -10vw;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, rgba(255, 91, 0, 0.16) 0%, rgba(255, 122, 46, 0.04) 60%, transparent 80%);
}
.ambient-glow--2 {
  bottom: 10vh;
  left: -10vw;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(255, 138, 0, 0.12) 0%, rgba(255, 91, 0, 0.02) 65%, transparent 80%);
}

/* Sections */
.section {
  padding: 56px 0;
  position: relative;
  z-index: 1;
}
.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 40px;
}
.section-head h2 {
  font-size: clamp(28px, 3.8vw, 40px);
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}
.section-head p {
  font-size: clamp(15.5px, 1.6vw, 17.5px);
  color: var(--ink-soft);
}

/* Feature Grid & Cards (120Hz Hardware Accelerated) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--surface-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  transition: transform 260ms var(--ease-spring), box-shadow 260ms var(--ease), border-color 200ms var(--ease);
  position: relative;
  overflow: hidden;
  transform: translate3d(0, 0, 0);
  will-change: transform, box-shadow;
  backface-visibility: hidden;
}
.feature-card:hover {
  transform: translate3d(0, -6px, 0);
  border-color: var(--border-orange);
  box-shadow: var(--shadow-card-hover);
}
.feature-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: var(--orange-soft);
  color: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: transform 260ms var(--ease-spring), background 200ms var(--ease), color 200ms var(--ease);
  transform: translate3d(0, 0, 0);
}
.feature-card:hover .feature-card__icon {
  transform: translate3d(0, 0, 0) scale(1.12) rotate(4deg);
  background: var(--orange);
  color: #fff;
}
.feature-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}
.feature-card p {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.6;
}

/* Base Buttons with Elastic 120Hz Physics */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: transform 180ms var(--ease-spring), box-shadow 180ms var(--ease), background 180ms var(--ease), border-color 180ms var(--ease);
  text-align: center;
  position: relative;
  overflow: hidden;
  line-height: 1;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  backface-visibility: hidden;
  user-select: none;
}
.btn::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(rgba(255,255,255,0.18), transparent);
  opacity: 0;
  transition: opacity 140ms var(--ease);
}
.btn:hover::after { opacity: 1; }
.btn:active { transform: translate3d(0, 0, 0) scale(0.96); transition: transform 60ms var(--ease); }

.btn-primary {
  background: linear-gradient(135deg, var(--orange) 0%, #FF721E 100%);
  color: #fff;
  box-shadow: 0 4px 16px -2px rgba(255, 91, 0, 0.4), 0 1px 2px rgba(255, 91, 0, 0.2);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #FF6611 0%, #FF7E30 100%);
  transform: translate3d(0, -2px, 0);
  box-shadow: 0 8px 24px -4px rgba(255, 91, 0, 0.5), 0 2px 4px rgba(255, 91, 0, 0.25);
}
.btn-lg {
  padding: 15px 28px;
  font-size: 15.5px;
  border-radius: var(--radius-md);
}
.btn-secondary {
  background: var(--surface-solid);
  color: var(--ink);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translate3d(0, -2px, 0);
  box-shadow: var(--shadow-card);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  padding: 12px 18px;
}
.btn-ghost:hover {
  color: var(--ink);
  background: var(--surface-subtle);
}

.btn:disabled, .btn[disabled] {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none !important;
  box-shadow: none !important;
}

/* Toast Notifications */
.cs-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate3d(-50%, 20px, 0) scale(0.95);
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100% - 32px);
  background: var(--surface-card);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 14px 24px;
  box-shadow: var(--shadow-modal);
  opacity: 0;
  pointer-events: none;
  transition: transform 260ms var(--ease-spring), opacity 220ms var(--ease);
  will-change: transform, opacity;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.cs-toast.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(-50%, 0, 0) scale(1);
}
.cs-toast__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
}
.cs-toast__title { font-weight: 800; font-family: 'Plus Jakarta Sans', sans-serif; display: block; color: var(--ink); }
.cs-toast__msg { color: var(--ink-soft); font-size: 13.5px; display: block; margin-top: 2px; }
.cs-toast__close {
  background: var(--border);
  border: none;
  color: var(--ink);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 140ms var(--ease);
}
.cs-toast__close:hover { background: var(--border-hover); }

/* Confetti Canvas */
#confetti-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

/* Smooth Entrance Reveal */
.reveal {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* ==========================================================================
   Universal Form System & Status Alerts
   ========================================================================== */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.form-field__label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 4px;
}
.required-mark {
  color: var(--orange);
  font-weight: 800;
}
.form-field__control {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--surface-solid);
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ink);
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease);
  box-shadow: var(--shadow-sm);
  outline: none;
}
.form-field__control:hover {
  border-color: var(--border-hover);
}
.form-field__control:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px var(--orange-soft), var(--shadow-card);
  background: var(--surface-hover);
}
.form-field__control::placeholder {
  color: var(--ink-faint);
}
textarea.form-field__control {
  min-height: 110px;
  resize: vertical;
  line-height: 1.6;
}
select.form-field__control {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23887C72' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  appearance: none;
  -webkit-appearance: none;
}

/* Report Status Alert */
.report-form__status {
  display: none;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.6;
}
.report-form__status.is-visible {
  display: block;
  animation: statusSlide 240ms var(--ease-spring);
}
.report-form__status--success {
  background: var(--green-soft);
  border: 1px solid var(--green-border);
  color: #065F46;
}
.report-form__status--error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}
@keyframes statusSlide {
  from { opacity: 0; transform: translate3d(0, -8px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
