/* ============================================
   Ether — Design System
   Pure black & white editorial
   ============================================ */

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

:root {
  --black: #000000;
  --white: #FFFFFF;
  --gray-100: #F5F5F5;
  --gray-200: #E5E5E5;
  --gray-300: #CCCCCC;
  --gray-500: #999999;
  --gray-700: #555555;
  --gray-800: #333333;
  --gray-900: #111111;
  --danger: #FF3B30;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Outfit', system-ui, sans-serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Layout */
  --max-width: 1200px;
  --header-height: 60px;
  --sidebar-width: 250px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, textarea, select {
  font-family: var(--font-sans);
  background: transparent;
  color: var(--white);
  border: none;
  border-bottom: 1px solid var(--gray-700);
  padding: 12px 0;
  font-size: 0.95rem;
  transition: border-color var(--duration-normal) var(--ease-out);
  outline: none;
  width: 100%;
  border-radius: 0;
  -webkit-appearance: none;
}

input:focus, textarea:focus, select:focus {
  border-bottom-color: var(--white);
}

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

::selection {
  background: var(--white);
  color: var(--black);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--gray-800);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; font-family: var(--font-sans); font-weight: 400; }

p {
  line-height: 1.7;
  font-weight: 300;
}

.label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-500);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  white-space: nowrap;
}

.btn-primary {
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--white);
}

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

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--gray-700);
}

.btn-secondary:hover {
  border-color: var(--white);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(255,59,48,0.3);
}

.btn-danger:hover {
  border-color: var(--danger);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.75rem;
}

.btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* --- Loading --- */
.spinner {
  width: 20px;
  height: 20px;
  border: 1px solid var(--gray-800);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-sm {
  width: 14px;
  height: 14px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Toast --- */
.toast-container {
  position: fixed;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
}

.toast {
  background: var(--white);
  color: var(--black);
  padding: 14px 28px;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  animation: toastIn var(--duration-normal) var(--ease-out);
}

.toast-error {
  border-left: 2px solid var(--danger);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(10px); }
}

/* --- Utility --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.hidden { display: none !important; }

.fade-in {
  animation: fadeIn var(--duration-normal) var(--ease-out);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Form --- */
.form-group {
  margin-bottom: var(--space-xl);
}

.form-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: var(--space-sm);
}

.form-help {
  font-size: 0.75rem;
  color: var(--gray-700);
  margin-top: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

textarea {
  min-height: 100px;
  resize: vertical;
  border: 1px solid var(--gray-800);
  padding: 12px;
}

textarea:focus {
  border-color: var(--gray-500);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  :root {
    --space-lg: 20px;
    --space-xl: 28px;
    --space-2xl: 40px;
    --space-3xl: 48px;
    --space-4xl: 72px;
    --header-height: 56px;
  }

  .container {
    padding: 0 var(--space-md);
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}
