/* ===== Ocelia shared styles ===== */

:root {
  --bg: #F6F3EC;
  --bg-warm: #EFEAE0;
  --ink: #1F2A6E;
  --ink-deep: #141C4F;
  --muted: #5C6483;
  --line: rgba(31, 42, 110, 0.14);
  --accent: #2A35B8;
  --max-width: 1320px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(42, 53, 184, 0.06), transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(42, 53, 184, 0.04), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.16 0 0 0 0 0.43 0 0 0 0.4 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.5'/></svg>");
  opacity: 0.18;
  pointer-events: none;
  mix-blend-mode: multiply;
  z-index: 1;
}

#dotMatrix {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  animation: fadeIn 1.6s ease 0.2s forwards;
}

.page {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  width: 100%;
  padding: 32px clamp(24px, 5vw, 64px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  opacity: 0;
  animation: fadeDown 1s ease 0.1s forwards;
}

.eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 10px;
  vertical-align: middle;
  animation: pulse 2.4s ease-in-out infinite;
}

.header-meta {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

a.header-meta:hover { color: var(--accent); }

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(40px, 8vh, 80px) clamp(24px, 5vw, 64px);
}

.hero {
  width: 100%;
  max-width: var(--max-width);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(56px, 9vh, 96px);
  align-items: center;
  text-align: center;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(20px, 3vh, 32px);
}

.wordmark {
  width: clamp(260px, 38vw, 440px);
  height: auto;
  opacity: 0;
  animation: fadeUp 1.2s ease 0.3s forwards;
}

.connected-care {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(28px, 4.5vw, 52px);
  font-weight: 300;
  color: var(--ink);
  letter-spacing: 0.01em;
  line-height: 1;
  opacity: 0;
  animation: fadeUp 1.2s ease 0.55s forwards;
}

.divider {
  width: 1px;
  height: 56px;
  background: var(--line);
  opacity: 0;
  animation: fadeIn 1s ease 1s forwards;
}

.tagline {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 300;
  line-height: 1.35;
  color: var(--ink-deep);
  max-width: 700px;
  letter-spacing: -0.01em;
  opacity: 0;
  animation: fadeUp 1.2s ease 0.85s forwards;
}

.tagline em {
  font-style: normal;
  font-weight: 400;
  color: var(--accent);
}

/* ===== Signup form ===== */

.signup {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  opacity: 0;
  animation: fadeUp 1.2s ease 1.1s forwards;
}

.signup-form {
  display: flex;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  backdrop-filter: blur(8px);
}

.signup-form:focus-within {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 4px rgba(42, 53, 184, 0.08);
}

.signup-form input[type="email"] {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 0 22px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 400;
  color: var(--ink-deep);
  min-width: 0;
}

.signup-form input[type="email"]::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.signup-form button {
  border: none;
  background: var(--ink);
  color: var(--bg);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 16px 32px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.3s ease, transform 0.2s ease;
  position: relative;
  overflow: hidden;
}

.signup-form button:hover { background: var(--accent); }
.signup-form button:active { transform: scale(0.98); }

.signup-form button .arrow {
  display: inline-block;
  margin-left: 8px;
  transition: transform 0.3s ease;
}
.signup-form button:hover .arrow { transform: translateX(4px); }

.signup-message {
  display: none;
  font-size: 16px;
  padding: 18px 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.signup-message.success { color: var(--accent); font-weight: 500; }
.signup-message.error { color: #B33A3A; font-weight: 500; }
.signup-message.visible {
  display: block;
  animation: fadeUp 0.6s ease forwards;
}

.signup-form.hidden { display: none; }

/* ===== Footer ===== */

footer {
  padding: 32px clamp(24px, 5vw, 64px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.05em;
  opacity: 0;
  animation: fadeIn 1s ease 1.4s forwards;
  border-top: 1px solid var(--line);
  margin: 0 clamp(24px, 5vw, 64px);
}

footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover { color: var(--accent); }

.footer-links { display: flex; gap: 28px; }

/* ===== Cookie banner ===== */

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(120%);
  width: calc(100% - 32px);
  max-width: 720px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 12px 40px rgba(31, 42, 110, 0.10);
  z-index: 100;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
  opacity: 0;
}

.cookie-banner.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.cookie-banner-text {
  flex: 1;
  min-width: 240px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-deep);
}

.cookie-banner-text a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cookie-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border: none;
  padding: 12px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.cookie-btn-decline {
  background: transparent;
  color: var(--muted);
}
.cookie-btn-decline:hover { color: var(--ink-deep); }

.cookie-btn-accept {
  background: var(--ink);
  color: var(--bg);
  padding: 12px 24px;
}
.cookie-btn-accept:hover { background: var(--accent); }
.cookie-btn-accept:active { transform: scale(0.98); }

/* ===== 404 specific ===== */

.error-code {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(96px, 18vw, 200px);
  font-weight: 200;
  color: var(--ink);
  letter-spacing: -0.04em;
  line-height: 0.9;
  opacity: 0;
  animation: fadeUp 1.2s ease 0.3s forwards;
}

.error-message {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 300;
  color: var(--ink-deep);
  max-width: 540px;
  letter-spacing: -0.01em;
  opacity: 0;
  animation: fadeUp 1.2s ease 0.6s forwards;
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  padding: 16px 32px;
  border-radius: 999px;
  transition: background 0.3s ease, transform 0.2s ease;
  opacity: 0;
  animation: fadeUp 1.2s ease 0.9s forwards;
}

.home-link:hover { background: var(--accent); }
.home-link:active { transform: scale(0.98); }
.home-link .arrow { transition: transform 0.3s ease; }
.home-link:hover .arrow { transform: translateX(-4px); }

/* ===== Animations ===== */

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

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* ===== Responsive ===== */

@media (max-width: 720px) {
  header {
    padding: 24px 24px;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  .header-meta { font-size: 12px; }

  .signup-form {
    flex-direction: column;
    border-radius: 24px;
    padding: 8px;
    gap: 8px;
  }
  .signup-form input[type="email"] {
    padding: 16px 18px;
    text-align: center;
  }
  .signup-form button {
    width: 100%;
    padding: 18px 24px;
  }

  .tagline { font-size: 22px; }
  .connected-care { font-size: 28px; }

  footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding: 24px 0;
  }
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }

  .cookie-banner {
    bottom: 16px;
    padding: 16px 18px;
    gap: 12px;
  }
  .cookie-banner-actions { width: 100%; justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
