/*
  Calclean Coming Soon
  - Mobile-first, minimal, accessible
  - Fullscreen background image with overlay for contrast
  - Maintainable tokens and utility-style sections
*/

/* Design tokens */
:root {
  /* Colors */
  --bg-fallback: #0f172a;        /* slate-900 */
  --overlay: rgba(0, 0, 0, 0.45);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.8);
  --accent: #22c55e;             /* green-500 */
  --accent-contrast: #0a0f0b;

  /* Typography */
  --font-sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --size-title: clamp(2rem, 6vw, 4rem);
  --size-sub: clamp(1rem, 3.2vw, 1.25rem);

  /* Layout */
  --content-max: 64rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --radius: 0.75rem;
  --radius-full: 999px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* Base reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg-fallback);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Accessibility helpers */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: #000;
  color: #fff;
  padding: var(--space-2) var(--space-4);
  z-index: 9999;
}
.skip-link:focus {
  top: 0;
}

/* Page layout */
.page {
  min-height: 100svh; /* supports mobile browser UI */
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto; /* content, footer */
}

/* Background layer (fullscreen) */
.bg {
  position: fixed;
  inset: 0;
  background: url("back.webp") center / cover no-repeat;
  background-color: #0f172a; /* fallback */
  z-index: -2;
}

/* Overlay for readability */
.overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: -1;
}

/* Hero content */
.hero {
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--space-8) var(--space-4);
  max-width: var(--content-max);
  margin-inline: auto;
  width: 100%;
}

.brand {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-6);
}

.logo {
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: var(--space-2) var(--space-4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: saturate(140%) blur(6px);
  border-radius: var(--radius-full);
}

.title {
  font-size: var(--size-title);
  line-height: 1.1;
  margin: 0 0 var(--space-4) 0;
}

.subtitle {
  font-size: var(--size-sub);
  color: var(--muted);
  margin: 0 0 var(--space-8) 0;
  max-width: 48ch;
}

/* CTA form */
.cta {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  width: min(32rem, 90vw);
  margin-inline: auto;
}

.cta input[type="email"] {
  width: 100%;
  padding: var(--space-4) var(--space-4);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  outline: none;
}
.cta input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.cta button {
  cursor: pointer;
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius);
  border: none;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: transform 120ms ease, filter 120ms ease;
}
.cta button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}
.cta button:active {
  transform: translateY(0);
}

.help {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Footer */
.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-4);
  color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
}

/* Larger screens */
@media (min-width: 640px) {
  .cta {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cta button {
    transition: none;
  }
}

/* Screen-reader only text */
.sr-only {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
  border: 0; padding: 0; margin: -1px;
}
