/* monomo brand foundation
   ========================
   design tokens derived from tildont (home2.css).
   import this BEFORE any page-specific CSS. */

:root {
  /* palette */
  --ink: #161616;
  --paper: #F8F8F8;
  --white: #ffffff;
  --muted: #606060;
  --border: rgba(22, 22, 22, 0.10);
  --surface: #f2f2f2;
  --muted-light: #757575;

  /* dark section palette */
  --dark-bg: #0d0d0d;
  --dark-text: #f5f5f5;
  --dark-muted: rgba(255, 255, 255, 0.4);
  --dark-border: rgba(255, 255, 255, 0.08);

  /* semantic */
  --bg: var(--white);
  --text: var(--ink);
  --text-muted: var(--muted);
  --success: #2f2f2f;
  --error: #6f6f6f;

  /* status (monochrome) */
  --status-booked: #5f5f5f;
  --status-started: #4f4f4f;
  --status-ended: #6f6f6f;
  --status-processing: #7d7d7d;
  --status-uploading: #8d8d8d;
  --status-delivered: #2f2f2f;
  --status-failed: #141414;

  /* client segment badges (monochrome) */
  --segment-new-bg: var(--paper);
  --segment-new-text: #666666;
  --segment-returning-bg: #efefef;
  --segment-returning-text: #4f4f4f;
  --segment-regular-bg: #e5e5e5;
  --segment-regular-text: #3d3d3d;
  --segment-vip-bg: #dbdbdb;
  --segment-vip-text: #2d2d2d;

  /* typography — derived from tildont home2.css */
  --font-sans: 'Manrope', Arial, sans-serif;
  --text-hero: clamp(3rem, 10vw, 6rem);
  --text-display: clamp(2.5rem, 8vw, 5rem);
  --text-title: clamp(2.25rem, 7vw, 4.25rem);
  --text-heading: clamp(1.875rem, 6vw, 3.5rem);
  --text-subheading: clamp(1.375rem, 4vw, 2rem);
  --text-body-lg: clamp(1.0625rem, 2.1vw, 1.25rem);
  --text-body: clamp(1rem, 1.7vw, 1.125rem);
  --text-caption: clamp(0.875rem, 1.5vw, 0.9375rem);
  --text-eyebrow: clamp(0.75rem, 1.4vw, 0.8125rem);

  /* spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 80px;
  --space-section: clamp(56px, 7.2vw, 72px);
  --space-section-loose: clamp(60px, 8vw, 80px);
  --space-section-tight: clamp(44px, 6vw, 56px);
  --space-section-mobile: 24px;

  /* copy sizes — fluid body text from tildont */
  --copy-regular: clamp(17px, 1.2vw, 19px);
  --copy-lead: clamp(18px, 1.6vw, 21px);
  --page-gutter: clamp(20px, 5vw, 24px);

  /* shadows */
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.06);

  /* border variants */
  --border-light: rgba(0, 0, 0, 0.06);
  --border-medium: rgba(22, 22, 22, 0.18);

  /* content widths */
  --content-width: 600px;
  --content-width-narrow: 440px;

  /* room surfaces (dashboard) */
  --white-room: var(--paper);
  --black-room: #171717;
  --black-room-text: #e8e8e8;
  --black-room-muted: #999;
  --black-room-border: rgba(255,255,255,0.08);
  --black-room-card: #232323;

  /* functional status accents (dashboard) */
  --status-active: #3f3f3f;
  --status-alert: #1f1f1f;

  /* status badge fills (dashboard) */
  --badge-ended-bg: #e2e2e2;
  --badge-ended-text: #555;
  --badge-processing-bg: #d8d8d8;
  --badge-processing-text: #444;
  --badge-uploading-bg: #ccc;
  --badge-uploading-text: #444;

  /* border radius */
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 100px;
  --touch-min: 44px;

  /* nav */
  --nav-height: 80px;
  --nav-height-mobile: 64px;

  /* animation */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-reveal: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration-fast: 0.15s;
  --duration-normal: 0.3s;
  --duration-medium: 0.5s;
  --duration-slow: 1s;
}

/* ============================================
   global resets
   ============================================ */

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

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

h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, form {
  margin: 0;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
}

body {
  margin: 0;
  background-color: var(--white);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.55;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

/* display headings — editorial */
h1, h2 {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

/* iOS: prevent auto-zoom on input focus */
input, select, textarea {
  font-size: 16px;
  font-family: var(--font-sans);
}

/* links inherit color by default */
a {
  color: var(--ink);
  text-decoration: none;
}

/* brand mark in page headers */
.brand-mark {
  display: block;
  margin: 0 auto 8px;
}

/* ============================================
   eyebrow label
   ============================================ */

.eyebrow {
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
  line-height: 1;
}

.dark-section .eyebrow {
  color: var(--dark-muted);
}

/* ============================================
   dark section
   ============================================ */

.dark-section {
  background: var(--dark-bg);
  color: var(--dark-text);
}

.dark-section a { color: var(--dark-text); }

/* ============================================
   pill button system — derived from tildont .btn
   ============================================ */

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 100px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  min-height: 48px;
  padding: 0 30px;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s ease-in-out,
              color 0.2s ease-in-out,
              border-color 0.2s ease-in-out,
              opacity 0.2s ease-in-out,
              transform var(--duration-fast) ease;
}

.btn-pill-sm {
  /* keep "small" pills compliant with 44px minimum touch target */
  min-height: var(--touch-min);
  padding: 0 20px;
  font-size: 0.875rem;
}

/* variants */
.btn-pill-primary {
  background: var(--ink);
  color: var(--white);
}

.btn-pill-outline {
  background: transparent;
  color: var(--ink);
  border: 3px solid var(--ink);
}

.btn-pill-light {
  background: var(--white);
  color: var(--dark-bg);
}

.btn-pill-outline-light {
  background: transparent;
  color: var(--dark-text);
  border: 3px solid var(--dark-text);
}

/* hover (desktop only) */
@media (hover: hover) and (pointer: fine) {
  .btn-pill:hover {
    opacity: 0.85;
    transform: translateY(-1px);
  }
}

/* press */
.btn-pill:active {
  opacity: 0.7;
}

/* keyboard focus */
.btn-pill:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* disabled */
.btn-pill:disabled,
.btn-pill.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* loading state */
.btn-pill.is-loading {
  color: transparent;
  pointer-events: none;
  position: relative;
}
.btn-pill.is-loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: var(--white);
  border-radius: 50%;
  animation: btnSpin 0.6s linear infinite;
}
.btn-pill-outline.is-loading::after { border-top-color: var(--ink); }
@keyframes btnSpin { to { transform: rotate(360deg); } }

/* full width */
.btn-pill-block {
  width: 100%;
}

/* ============================================
   form inputs
   ============================================ */

.input-brand {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid rgba(22, 22, 22, 0.08);
  border-radius: var(--radius-sm);
  min-height: var(--touch-min);
  font-size: 16px;
  font-family: var(--font-sans);
  font-weight: 300;
  background: var(--white);
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color var(--duration-normal) ease;
}

.input-brand:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(22,22,22,0.04);
}

.input-brand:focus-visible {
  box-shadow: 0 0 0 2px var(--ink);
}

.input-brand::placeholder {
  color: var(--muted);
}

/* dark variant */
.dark-section .input-brand {
  background: transparent;
  color: var(--dark-text);
  border-color: rgba(255, 255, 255, 0.15);
}

.dark-section .input-brand:focus {
  border-color: var(--dark-text);
}

.dark-section .btn-pill:focus-visible {
  outline-color: var(--dark-text);
}

.dark-section .input-brand:focus-visible {
  box-shadow: 0 0 0 2px var(--dark-text);
}

.dark-section .input-brand::placeholder {
  color: var(--dark-muted);
}

/* label */
.input-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-light);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.dark-section .input-label {
  color: var(--dark-muted);
}

/* select */
select.input-brand {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23606060' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

/* ============================================
   film grain overlay
   ============================================ */

.has-grain::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.032;
  background-size: 256px 256px;
}

/* ============================================
   scroll reveal
   ============================================ */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s var(--ease-reveal),
                transform 0.6s var(--ease-reveal);
  }

  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }

  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
}

/* ============================================
   reveal-up entrance animation
   ============================================ */

@media (prefers-reduced-motion: no-preference) {
  @keyframes reveal-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* ============================================
   page header (dark, centered)
   ============================================ */

.page-header {
  background: var(--dark-bg);
  color: var(--dark-text);
  text-align: center;
  padding: max(48px, calc(24px + env(safe-area-inset-top))) var(--page-gutter) clamp(36px, 6vw, 48px);
}

.page-header .brand-mark {
  fill: var(--dark-text);
  margin-bottom: 20px;
}

.page-header h1 {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1.1;
}

.page-header .tagline {
  color: var(--dark-muted);
  font-size: 0.9375rem;
  margin: 12px 0 0;
  font-weight: 300;
  letter-spacing: 0.02em;
}

@media (max-width: 440px) {
  .page-header {
    padding: max(34px, calc(16px + env(safe-area-inset-top))) var(--page-gutter) 30px;
  }
  .page-header .brand-mark {
    width: 32px;
    height: auto;
    margin-bottom: 12px;
  }
  .page-header h1 {
    font-size: 1.6875rem;
  }
  .page-header .tagline {
    margin-top: 6px;
    font-size: 0.9375rem;
  }
}

/* ============================================
   page footer (dark, minimal)
   ============================================ */

.page-footer {
  background: var(--dark-bg);
  color: var(--dark-muted);
  text-align: center;
  padding: 40px var(--page-gutter);
  padding-bottom: max(40px, calc(20px + env(safe-area-inset-bottom)));
  font-size: var(--text-caption);
  font-weight: 300;
  letter-spacing: 0.02em;
}

.page-footer a {
  color: var(--dark-muted);
  text-decoration: none;
}

@media (hover: hover) {
  .page-footer a:hover {
    color: var(--dark-text);
  }
}

/* ============================================
   page content area
   ============================================ */

.page-content {
  padding: var(--space-lg) var(--page-gutter);
  padding-bottom: max(var(--space-lg), calc(var(--space-lg) + env(safe-area-inset-bottom)));
  max-width: var(--content-width);
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  background: var(--paper);
}

@media (min-width: 768px) {
  .page-content {
    padding: clamp(40px, 5vh, 64px) var(--page-gutter);
    padding-bottom: clamp(40px, 5vh, 64px);
  }
}

@media (max-width: 440px) {
  .page-content {
    padding: var(--space-section-mobile) var(--page-gutter) max(24px, calc(14px + env(safe-area-inset-bottom)));
  }
}

@media (max-width: 440px) {
  .page-footer {
    padding: 20px var(--page-gutter);
    padding-bottom: max(20px, calc(12px + env(safe-area-inset-bottom)));
  }
}

/* ============================================
   notice/message component
   ============================================ */

.notice {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: none;
  font-size: var(--text-body);
  font-weight: 300;
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.notice-strong {
  border: 1.5px solid var(--ink);
}

/* ============================================
   utility: action link spacing
   ============================================ */

.action-link {
  margin-top: var(--space-sm);
}

/* ============================================
   inline notice (form validation, alerts)
   ============================================ */

.notice-inline {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border: 1px solid var(--border);
  font-size: var(--text-body);
  text-align: center;
  animation: notice-in var(--duration-normal) var(--ease-spring);
}

@keyframes notice-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .notice-inline {
    animation: none;
  }
}

/* ============================================
   utilities — propagated from tildont
   ============================================ */

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

.body-no-scroll {
  overflow: hidden;
}

/* ============================================
   retina / HiDPI refinements
   ============================================ */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .input-brand {
    border-width: 0.5px;
  }

  .notice-inline {
    border-width: 0.5px;
  }
}
