/*
Theme Name: E-Inv Suite — Coming Soon
Theme URI: https://einvsuite.com
Author: Enterprise Limited
Description: Pre-launch holding page for einvsuite.com. Announces the launch window and the six products. Tokens, type and the bordered-grid idiom are taken from the E-Inv Suite marketing site so the holding page and the launch site read as one brand.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: einv-coming-soon
*/

/* Tokens are copied from the marketing theme rather than re-picked, so
   the holding page and the launch site cannot drift apart. */
:root {
  --background: #fcfefd;
  --foreground: #001209;

  --primary: #45cd55;
  --primary-strong: #00810e;

  --muted-foreground: #526259;
  --border: #dbe4de;
  --soft: #eef6f1;

  /* The dark ground used by the brand's social cards and the site's
     footer. Not a new value: it is the marketing site's forest. */
  --ground: #0a1512;
  --ground-line: #1a2822;
  --on-ground: #f7faf8;
  --on-ground-soft: #9aaaa3;

  --font-sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: .25rem;
  --shell-w: 76rem;
}

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

html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--ground);
  color: var(--on-ground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Browser surfaces themed from the palette, not left at defaults. */
::selection { background: var(--primary); color: #04140b; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
a { color: inherit; }

.shell {
  width: 100%;
  max-width: var(--shell-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- layout ------------------------------------------------------- */

.page {
  min-height: 100dvh;         /* dvh, not vh: avoids the iOS address-bar jump */
  display: flex;
  flex-direction: column;
}

.masthead { padding: 40px 0 0; }

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Header action. Solid green on the home page because it is the only
   outbound route; ghost on the contact page, where it is just a way back. */
.nav-cta {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 4px;
  background: var(--primary);
  color: #04140b;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease-out, transform .1s ease-out;
}
.nav-cta:hover { background: #5bd968; }
.nav-cta:active { transform: translateY(1px); }

.nav-cta--ghost {
  background: transparent;
  border: 1px solid var(--ground-line);
  color: var(--on-ground);
}
.nav-cta--ghost:hover { background: #10251b; border-color: var(--primary); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-type {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.brand-type .a { color: var(--on-ground); }
.brand-type .b { color: var(--primary); }

.hero {
  display: flex;
  align-items: center;
  min-height: min(76vh, 760px);
  padding: 64px 0 76px;
}

.hero-inner { display: grid; gap: 56px; }
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 72px; align-items: center; }
}

h1 {
  margin: 0;
  font-size: clamp(2.25rem, 5.4vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: auto;
}
h1 .accent { color: var(--primary); }

/* The second beat of the headline: same weight and tracking, a step down
   in size, in the brand green so it reads as part of the H1 rather than
   as body copy. */
.subhead {
  margin: 14px 0 0;
  max-width: 24ch;
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.18;
  color: var(--primary);
  text-wrap: balance;
}

.lede {
  margin: 22px 0 0;
  max-width: 54ch;
  font-size: 17px;
  line-height: 1.6;
  color: #c3cfc9;
}

/* ---- launch window ------------------------------------------------- */

/* Launch window. A two-line stat, not a pill: the label is a quiet mono
   caption and the date carries the weight, so it reads as a fact rather
   than a tag. The live dot marks the one time-sensitive thing here. */
.window {
  margin: 34px 0 0;
  display: inline-grid;
  gap: 6px;
  padding: 16px 22px 16px 20px;
  border: 1px solid var(--ground-line);
  border-left: 2px solid var(--primary);
  border-radius: 0 4px 4px 0;
  background: linear-gradient(90deg, #10251b 0%, #0d1b16 100%);
}

.window-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--on-ground-soft);
}

.window-value {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--on-ground);
}

/* ---- notify form --------------------------------------------------- */

.notify { margin-top: 34px; max-width: 460px; }
.notify-row { display: flex; flex-wrap: wrap; gap: 10px; }

.notify input[type="email"] {
  flex: 1 1 180px;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
  color: var(--on-ground);
  background: #0d1b16;
  border: 1px solid var(--ground-line);
  border-radius: var(--radius);
}
.notify input[type="email"]::placeholder { color: #6d7d76; }
.notify input[type="email"]:focus-visible { border-color: var(--primary); }

.notify button {
  height: 48px;
  padding: 0 22px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #04140b;
  background: var(--primary);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s ease-out, transform .1s ease-out;
}
.notify button:hover { background: #5bd968; }
.notify button:active { transform: translateY(1px); }
.notify button[disabled] { opacity: .55; cursor: not-allowed; }

.notify-row > * { max-width: 100%; }

@media (max-width: 420px) {
  .notify-row { flex-direction: column; align-items: stretch; }
  .notify input[type="email"] { flex: 0 0 48px; height: 48px; }
  .notify button { width: 100%; }
}

.notify-note {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--on-ground-soft);
}
.notify-msg {
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
}
.notify-msg[hidden] { display: none; }

/* ---- product list -------------------------------------------------- */

/* The bordered-row idiom from the marketing site: a hairline above every
   row, nothing boxed. Cards would be the lazy container here. */
.products { border-top: 1px solid var(--ground-line); }

.product {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 4px 20px;
  padding: 17px 0;
  border-bottom: 1px solid var(--ground-line);
}
@media (min-width: 620px) {
  .product { grid-template-columns: 30px minmax(0, 15rem) minmax(0, 1fr); align-items: baseline; }
}

.product-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--primary);
}
.product-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--on-ground);
}
.product-desc {
  grid-column: 2 / -1;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--on-ground-soft);
}
@media (min-width: 620px) {
  .product-desc { grid-column: auto; }
}

.deploy {
  margin-top: 26px;
  font-size: 14.5px;
  color: #c3cfc9;
}

/* ---- bands -------------------------------------------------------- */

.band {
  border-top: 1px solid var(--ground-line);
  padding: 72px 0;
}
.band-alt { background: #081210; }

.band-title {
  margin: 0;
  font-size: clamp(1.6rem, 3.2vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.14;
  color: var(--on-ground);
}

.band-lede {
  margin: 16px 0 0;
  max-width: 62ch;
  font-size: 16px;
  line-height: 1.6;
  color: #c3cfc9;
}

.band-foot {
  margin: 36px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--ground-line);
  max-width: 70ch;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--on-ground-soft);
}

/* ---- product cards -------------------------------------------------

   The marketing site presents products as tinted cards with a console
   mock cropped by the card edge (see product-cards.tsx). Same pattern
   here: pastel tone, title, body, then a wash the mock sits on, wider
   than its well so it runs off the right edge.
   -------------------------------------------------------------------- */

.cards {
  margin-top: 40px;
  display: grid;
  gap: 16px;
}
@media (min-width: 900px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 27.5rem;
  overflow: hidden;
  border-radius: 4px;              /* the site's tight radius, not 12-16 */
  color: var(--foreground);
}
.card--mint     { background: #eef6f1; }
.card--lavender { background: #f4eeff; }
.card--ice      { background: #e1f6ff; }

.card-head { padding: 28px 28px 0; }

.card-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--foreground);
}
.card-body {
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: #526259;
}

/* The well: a gradient wash the mock sits on, cropped by the card. */
.card-well {
  position: relative;
  display: flex;
  flex: 1;
  align-items: flex-end;
  margin-top: 28px;
  padding: 24px 0 0 24px;
  overflow: hidden;
}
.card--mint     .card-well { background: linear-gradient(to bottom right, rgba(69,205,85,.30), rgba(69,205,85,.05)); }
.card--lavender .card-well { background: linear-gradient(to bottom right, rgba(167,124,240,.30), rgba(167,124,240,.05)); }
.card--ice      .card-well { background: linear-gradient(to bottom right, rgba(86,176,230,.30), rgba(86,176,230,.05)); }

/* The mock is wider than its well and pushed right, so it bleeds off the
   card exactly as the site's device mockups do. */
.mock {
  width: 330px;
  flex-shrink: 0;
  background: #fff;
  border-top-left-radius: 8px;
  box-shadow: 0 10px 26px rgba(0, 18, 9, .13);
  overflow: hidden;
}
.mock-head {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(0, 18, 9, .09);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .09em;
  color: #6b7c74;
}
.mock-row:last-child { border-bottom: 0; }

.mock-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0, 18, 9, .07);
}
.mock-id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--foreground);
}
.mock-label {
  grid-column: 1;
  font-size: 12px;
  color: #526259;
}
.mock-state {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--primary-strong);
}
.mock-state--review,
.mock-state--pending { color: #a06a00; }

/* ---- deployment modes ----------------------------------------------

   The site's console marks a chosen option with a tinted panel, a green
   border and a tick (see the deployment screens). Same here: BYOC is
   shown selected because it is the mode the page argues for.
   -------------------------------------------------------------------- */

.modes {
  margin-top: 40px;
  display: grid;
  gap: 16px;
}
@media (min-width: 860px) {
  .modes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.mode {
  position: relative;
  padding: 26px 26px 28px;
  border: 1px solid var(--ground-line);
  border-radius: 4px;
  background: #0d1b16;
}
.mode--on {
  border-color: var(--primary);
  background: #10251b;
}
.mode-tick {
  position: absolute;
  top: 22px;
  right: 22px;
  display: inline-flex;
  color: var(--primary);
}
.mode-name {
  margin: 0;
  padding-right: 28px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.014em;
  color: var(--on-ground);
}
.mode-text {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: #c3cfc9;
}
.mode-note {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--ground-line);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--on-ground-soft);
}

/* ---- footer -------------------------------------------------------- */

.foot {
  margin-top: auto;
  border-top: 1px solid var(--ground-line);
  padding: 26px 0 34px;
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: var(--on-ground-soft);
}
.foot a { color: var(--on-ground-soft); text-decoration: none; }
.foot-inner > span:last-child { display: inline-flex; align-items: center; flex-wrap: wrap; }
.foot a:hover { color: var(--on-ground); }

/* The brand's closing hairline, as on the social cards. */
.rule {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(69,205,85,.33) 45%, var(--primary));
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* ---- contact -------------------------------------------------------- */

/* flex:1 pushes the footer to the bottom on short pages. .page is a
   full-height flex column; without this the main only takes its content
   height and the footer floats mid-viewport. */
.contact {
  flex: 1;
  padding: 64px 0 88px;
}

.contact-grid { display: grid; gap: 48px; }
@media (min-width: 940px) {
  .contact-grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 72px; }
}

.contact-h1 {
  margin: 0;
  font-size: clamp(2rem, 4.4vw, 2.9rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--on-ground);
}

/* The launch badge on this page reuses .window from the hero, so the two
   pages state the launch date in exactly one visual language. */
.contact .window { margin-top: 32px; }

.contact-direct {
  margin: 20px 0 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--on-ground-soft);
}
.contact-direct a {
  color: var(--primary);
  text-decoration: none;
  margin-left: 6px;
}
.contact-direct a:hover { text-decoration: underline; }

.contact-notice {
  margin: 0 0 24px;
  padding: 13px 16px;
  border: 1px solid var(--ground-line);
  border-radius: 4px;
  background: #0d1b16;
  font-size: 14.5px;
  line-height: 1.5;
  color: #c3cfc9;
}
.contact-notice--ok { border-color: var(--primary); color: var(--on-ground); }

.cform { display: grid; gap: 0; }
.f-hp { position: absolute; left: -9999px; }

.f-row { display: grid; gap: 18px; }
@media (min-width: 620px) {
  .f-row { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
}

.f { margin: 0; display: grid; gap: 7px; }
.f-full { margin-top: 18px; }

.f-label { font-size: 13.5px; font-weight: 500; color: #c3cfc9; }
.f-req { color: var(--primary); }

.f-input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  font: inherit;
  font-size: 15px;
  color: var(--on-ground);
  background: #0d1b16;
  border: 1px solid var(--ground-line);
  border-radius: 4px;
}
.f-input::placeholder { color: #6d7d76; }
.f-input:focus-visible { border-color: var(--primary); }

.f-area {
  height: auto;
  min-height: 140px;
  padding: 12px 13px;
  line-height: 1.55;
  resize: vertical;
}

.f-actions { margin: 24px 0 0; }
.f-submit {
  height: 48px;
  padding: 0 26px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #04140b;
  background: var(--primary);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  transition: background .15s ease-out, transform .1s ease-out;
}
.f-submit:hover { background: #5bd968; }
.f-submit:active { transform: translateY(1px); }


/* ---- motion ----------------------------------------------------------

   One authored moment: content rises into place on load, and scroll-
   revealed sections do the same as they enter. Everything uses a strong
   ease-out so it decelerates into position rather than easing in — at
   the same duration that reads as faster and more deliberate.

   Entrances are opacity + translate + a slight blur lift. Nothing loops,
   nothing bounces: this page argues for precision, and motion that
   draws attention to itself would undercut that.
   --------------------------------------------------------------------- */

:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --rise: 14px;
}

@keyframes einv-rise {
  from { opacity: 0; transform: translate3d(0, var(--rise), 0); filter: blur(6px); }
  to   { opacity: 1; transform: translate3d(0, 0, 0);           filter: blur(0); }
}

/* Every animated element is visible by default and the animation only
   plays it in. If the animation never runs — an old engine, a stalled
   paint, JS-free crawlers, a headless renderer — the content is simply
   there, which matters more than the entrance. */
.masthead-inner, .hero h1, .subhead, .hero .lede, .window, .notify,
.products, .product, .card, .mode, .feature,
.band-title, .band-lede, .band-foot {
  opacity: 1;
}

/* Load sequence. Staggered by role, not by a blanket nth-child, so the
   eye lands on the headline first and the form last. */
.masthead-inner,
.hero h1,
.subhead,
.hero .lede,
.window,
.notify,
.products {
  animation: einv-rise .72s var(--ease-out) backwards;
}
.masthead-inner { animation-duration: .5s; }
.hero h1        { animation-delay: .06s; }
.subhead        { animation-delay: .14s; }
.hero .lede     { animation-delay: .20s; }
.window         { animation-delay: .27s; }
.notify         { animation-delay: .33s; }
.products       { animation-delay: .18s; }

/* Product rows cascade inside their own column. 45ms apart: enough to
   read as a sequence, short enough that the whole list settles fast. */
.product {
  animation: einv-rise .6s var(--ease-out) backwards;
}
.product:nth-child(1) { animation-delay: .24s; }
.product:nth-child(2) { animation-delay: .285s; }
.product:nth-child(3) { animation-delay: .33s; }
.product:nth-child(4) { animation-delay: .375s; }
.product:nth-child(5) { animation-delay: .42s; }
.product:nth-child(6) { animation-delay: .465s; }

/* Scroll reveal. Animation-timeline is progressive enhancement: where it
   is unsupported the element simply renders in place, already visible. */
@supports (animation-timeline: view()) {
  .card,
  .mode,
  .feature,
  .band-title,
  .band-lede,
  .band-foot {
    animation: einv-rise .8s var(--ease-out) backwards;
    animation-timeline: view();
    animation-range: entry 8% cover 26%;
  }
  /* Cards and modes arrive left to right. */
  .cards .card:nth-child(2),
  .modes .mode:nth-child(2) { animation-range: entry 4% cover 24%; }
  .cards .card:nth-child(3),
  .modes .mode:nth-child(3) { animation-range: entry 0% cover 22%; }
}

/* Hover: the mark's green corners ease toward the ink pair, so the
   four-corner model reads as closing. Pointer-gated — touch fires a
   false hover on tap. */
@media (hover: hover) and (pointer: fine) {
  .brand svg g { transition: transform .4s var(--ease-out); }
  .brand:hover svg g:first-of-type  { transform: translateX(1.5px); }
  .brand:hover svg g:nth-of-type(2) { transform: translateX(-1.5px); }

  .card { transition: transform .35s var(--ease-out); }
  .card:hover { transform: translateY(-3px); }

  .mode { transition: border-color .25s var(--ease-out), background .25s var(--ease-out); }
  .mode:hover { border-color: #2a4036; background: #10251b; }
}

/* The launch badge is the one place a small, slow pulse earns its keep:
   it marks the single time-sensitive fact on the page. */
@keyframes einv-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .55; }
}
.window-label::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: var(--primary);
  animation: einv-pulse 2.6s ease-in-out infinite;
}

/* Reduced motion: keep the fades that aid comprehension, drop every
   movement, blur and loop. Fewer and gentler, not zero. */
@keyframes einv-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .masthead-inner, .hero h1, .subhead, .hero .lede, .window, .notify,
  .products, .product, .card, .mode, .feature,
  .band-title, .band-lede, .band-foot {
    animation-name: einv-fade !important;
    animation-duration: .3s !important;
    animation-delay: 0s !important;
  }
  .window-label::before { animation: none; }
  .card:hover, .brand:hover svg g { transform: none !important; }
}
