/* ============================================================
   E1 Technology — site styles
   Brand: one wordmark, one ink, no icon.
   Reverse lockup (white on near-black) over a living background.
   ============================================================ */

:root {
  --ink: #17171B;          /* brand near-black */
  --bg: #0A0910;           /* deep canvas behind the animation */
  --violet: #7A18E0;       /* the single brand accent (the "1") */
  --paper: #FFFFFF;

  --fg: rgba(255, 255, 255, 0.96);
  --fg-soft: rgba(255, 255, 255, 0.62);
  --fg-faint: rgba(255, 255, 255, 0.40);
  --hair: rgba(255, 255, 255, 0.12);
  --glass: rgba(255, 255, 255, 0.045);

  --font: 'Manrope', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --page-x: clamp(24px, 6vw, 110px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100%;
}

body { overflow-x: hidden; }

/* ---- background canvas ---- */
#bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: block;
  z-index: 0;
}

/* subtle darkening at the edges so type always reads */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(130% 100% at 50% 38%, transparent 36%, rgba(5, 4, 10, 0.55) 100%),
    linear-gradient(180deg, rgba(5, 4, 10, 0.35) 0%, transparent 22%, transparent 70%, rgba(5, 4, 10, 0.55) 100%);
}

/* ---- layout shell ---- */
.shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(40px, 6vh, 76px);
  padding: clamp(48px, 7vh, 80px) var(--page-x) clamp(96px, 12vh, 140px);
  text-align: center;
}

/* ---- wordmark (reverse) ---- */
.wm {
  display: inline-flex;
  align-items: baseline;
  font-weight: 600;
  letter-spacing: -0.035em;
  font-size: clamp(22px, 3.2vw, 30px);
  line-height: 1.2;
  color: var(--fg);
  text-decoration: none;
  white-space: nowrap;
  padding: 2px 0;
  overflow: visible;
  transition: opacity 0.3s var(--ease);
}
.wm:hover { opacity: 0.82; }
/* single ink — one color, no accent, never clipped */
.wm .e1 { font-weight: 700; }
.wm .tech { font-weight: 500; }

/* ---- tagline / mission ---- */
.tagline {
  position: relative;
  margin: clamp(32px, 6vh, 72px) 0 0;   /* push the headline (and everything below) down; wordmark stays */
  padding: 0.12em 0.06em 0.16em;   /* room so ascenders/descenders never clip */
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.04;               /* never crop the g/y descenders */
  font-size: clamp(40px, 8.6vw, 150px);
  color: var(--fg);
  text-wrap: balance;
  overflow-wrap: break-word;
  max-width: 15ch;
  overflow: visible;
}
.tagline em { font-style: normal; }
/* ARTi sphere floats above the "rn" of "learning" (desktop) */
.tagline .sph-anchor { position: relative; white-space: nowrap; }
.tagline .sphere {
  position: absolute;
  left: 50%;
  top: 0;
  width: 0.74em;
  height: auto;
  transform: translate(-50%, -82%);
  pointer-events: none;
  /* multi-hue glow in the same colors as the background blooms */
  filter:
    drop-shadow(0 0 18px rgba(175, 82, 222, 0.60))
    drop-shadow(0 0 36px rgba(50, 173, 230, 0.40))
    drop-shadow(0 0 58px rgba(255, 45, 85, 0.26));
  animation: floaty 5.5s var(--ease) infinite, sphereGlow 9s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translate(-50%, -82%); }
  50%      { transform: translate(-50%, calc(-82% - 11px)); }
}
@keyframes sphereGlow {
  0%, 100% {
    filter:
      drop-shadow(0 0 18px rgba(175, 82, 222, 0.60))
      drop-shadow(0 0 36px rgba(50, 173, 230, 0.40))
      drop-shadow(0 0 58px rgba(255, 45, 85, 0.26));
  }
  50% {
    filter:
      drop-shadow(0 0 24px rgba(50, 173, 230, 0.60))
      drop-shadow(0 0 42px rgba(255, 45, 85, 0.40))
      drop-shadow(0 0 64px rgba(52, 199, 89, 0.26));
  }
}
.tagline em {
  font-style: normal;
  /* faint violet breath on the keyword */
  background: linear-gradient(180deg, #fff 0%, #E9D8FB 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- shared eyebrow label ---- */
.eyebrow {
  margin: 0 0 18px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

/* ---- products ---- */
.products { width: 100%; max-width: 880px; }
.capsules {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.capsule {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 28px;
  text-align: left;
  text-decoration: none;
  color: var(--fg);
  background: var(--glass);
  border: 1px solid var(--hair);
  border-radius: 22px;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.capsule:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.07);
}
/* both wordmarks: 100% white, identical height */
.cap-logo { display: block; width: auto; height: 30px; object-fit: contain; }
.cap-logo.paco { filter: brightness(0) invert(1); }  /* full-color PNG → pure white */
.cap-desc { font-weight: 500; font-size: 15px; line-height: 1.45; color: var(--fg-soft); margin-top: 2px; }
.cap-go { margin-top: 4px; font-weight: 600; font-size: 13px; letter-spacing: 0.02em; color: var(--fg-faint); }
.capsule:hover .cap-go { color: var(--fg); }

/* ---- contact ---- */
.contact { display: flex; justify-content: center; margin-top: clamp(20px, 5vh, 56px); }
.contact-btn {
  padding: 16px 44px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--violet);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 12px 40px rgba(122, 24, 224, 0.5);
  transition: transform 0.2s var(--ease), filter 0.2s var(--ease), box-shadow 0.3s var(--ease);
}
.contact-btn:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 18px 50px rgba(122, 24, 224, 0.6); }
.contact-btn:active { transform: translateY(0) scale(0.98); }

/* ---- modal / popup ---- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 4, 10, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade 0.25s var(--ease);
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  padding: 40px 36px 34px;
  text-align: left;
  background: #141019;
  border: 1px solid var(--hair);
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
  animation: pop 0.32s var(--ease);
}
.modal-card .eyebrow { margin-bottom: 8px; text-align: left; }
.modal-lead { margin: 0 0 22px; font-size: 15px; line-height: 1.5; color: var(--fg-soft); }
.modal-close {
  position: absolute;
  top: 16px; right: 18px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; line-height: 1;
  color: var(--fg-soft);
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.modal-close:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }

.cform { display: flex; flex-direction: column; gap: 12px; }
.cform #cf-company { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cform .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cform input,
.cform textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
  background: var(--glass);
  border: 1px solid var(--hair);
  border-radius: 14px;
  resize: vertical;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.cform input::placeholder,
.cform textarea::placeholder { color: var(--fg-faint); }
.cform input:focus,
.cform textarea:focus {
  outline: none;
  border-color: var(--violet);
  background: rgba(255, 255, 255, 0.07);
}
.send {
  align-self: center;
  margin-top: 4px;
  padding: 14px 36px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--violet);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.3s var(--ease), filter 0.2s var(--ease);
  box-shadow: 0 10px 34px rgba(122, 24, 224, 0.45);
}
.send:hover { transform: translateY(-2px); filter: brightness(1.08); }
.send:active { transform: translateY(0) scale(0.98); }
.cform-note { min-height: 18px; margin: 2px 0 0; font-size: 13px; font-weight: 600; color: var(--fg-soft); text-align: center; }

/* ---- footer ---- */
.foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--page-x) 36px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--fg-faint);
}
.foot-mark { color: var(--fg-faint); }

/* ---- responsive ---- */
@media (max-width: 680px) {
  .tagline { font-size: clamp(46px, 14vw, 92px); max-width: 9ch; }
  /* on mobile the headline stacks, so float the sphere above the whole title (not "rn") */
  .tagline .sph-anchor { position: static; }
  .tagline .sphere { left: 50%; top: 0; transform: translate(-50%, -84%); }
  .capsules { grid-template-columns: 1fr; }
  .cform .row { grid-template-columns: 1fr; }
  .foot { flex-direction: column; gap: 6px; text-align: center; }
  .foot-mark { display: none; }
}

/* ---- accessibility: respect reduced motion (JS also reads this) ---- */
@media (prefers-reduced-motion: reduce) {
  .capsule, .send, .wm { transition: none; }
}
