/*!
 * Copyright (C) 2026 BakerCMS
 *
 * This file is part of BakerCMS.
 *
 * BakerCMS is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; version 2 of the License.
 *
 * BakerCMS is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with BakerCMS. If not, see <https://www.gnu.org/licenses/>.
 */

/* ==========================================================================
   BakerCMS — coming soon holding page (direction 5)
   Identity: "Series B, dark" — deep navy canvas, elevated slate surfaces,
   electric-indigo accent, Inter Tight + Inter + Geist Mono.
   ========================================================================== */

:root {
  --bg: #090d16;
  --bg-2: #0c111d;
  --surface: #111726;
  --surface-2: #161d30;

  --ink: #eef1f8;
  --ink-2: #a6aec4;
  --muted: #7b849e;

  --indigo: #6673ff;
  --indigo-bright: #8f9cff;
  --indigo-deep: #4353ff;
  --indigo-soft: rgba(102, 115, 255, 0.12);
  --indigo-line: rgba(102, 115, 255, 0.35);

  --pit: #05070d;

  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1180px;
  --ease: cubic-bezier(0.25, 0.8, 0.3, 1);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 32px -16px rgba(0, 0, 0, 0.6);
}

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

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(102, 115, 255, 0.35); color: #fff; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }

h1 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--ink);
}

h1 em { font-style: normal; color: var(--indigo-bright); }

:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: min(100% - 3rem, var(--wrap));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  background: var(--indigo);
  color: #fff;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

.ico { width: 1.05em; height: 1.05em; fill: currentColor; }

/* ------------------------------------------------------------- Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  padding: 0.62rem 1.3rem;
  border-radius: 10px;
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.16s var(--ease), color 0.16s var(--ease),
              border-color 0.16s var(--ease), box-shadow 0.16s var(--ease),
              transform 0.16s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-lg { padding: 0.82rem 1.5rem; font-size: 1rem; border-radius: 12px; }

.btn-solid {
  background: var(--indigo-deep);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 4px 16px -4px rgba(67, 83, 255, 0.5);
}
.btn-solid:hover { background: var(--indigo); }

/* -------------------------------------------------------------- Header */

.site-header {
  position: relative;
  z-index: 100;
  background: rgba(9, 13, 22, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-mark { width: 2rem; height: 2rem; }
.brand-mark svg { width: 100%; height: 100%; }
.bm-tile { fill: var(--indigo-deep); }
.bm-glyph { stroke: #fff; stroke-width: 2.4; stroke-linecap: round; fill: none; }

.brand-word {
  font-family: var(--display);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.15s var(--ease);
}
.ghost-link:hover { color: var(--ink); }

/* ------------------------------------------------------- Coming soon */

.coming-soon {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5.5rem 0 4.5rem;
  background:
    radial-gradient(48rem 26rem at 78% -20%, rgba(67, 83, 255, 0.22) 0%, transparent 65%),
    linear-gradient(to bottom, var(--bg-2) 0%, var(--bg) 60%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.coming-soon::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
  pointer-events: none;
  animation: grid-drift 28s linear infinite;
}

.coming-soon > .wrap { position: relative; }

.coming-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 4rem;
  align-items: center;
}

.coming-copy {
  animation: rise 0.7s var(--ease) both;
}

.coming-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 1.35rem;
}

.badge {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--indigo-soft);
  color: var(--indigo-bright);
  border: 1px solid var(--indigo-line);
  border-radius: 99px;
  padding: 0.18rem 0.62rem;
}

.badge-pulse {
  animation: badge-glow 2.8s var(--ease) infinite;
}

.coming-brand {
  font-family: var(--display);
  font-size: clamp(2.85rem, 6.5vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.95;
  color: var(--ink);
  margin: 0 0 1.1rem;
}

.coming-copy h1 {
  font-size: clamp(1.85rem, 3.4vw, 2.55rem);
  margin-bottom: 1.25rem;
}

.coming-lede {
  font-size: 1.1rem;
  color: var(--ink-2);
  max-width: 34rem;
  margin-bottom: 2rem;
}

/* Notify form */

.notify-wrap {
  max-width: 32rem;
}

.notify-form {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.75rem;
  max-width: 32rem;
}

.notify-form input[type="email"] {
  flex: 1 1 14rem;
  min-width: 0;
  margin: 0;
  padding: 0.82rem 1rem;
  font: inherit;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.notify-form input::placeholder { color: var(--muted); }
.notify-form input:focus-visible {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px var(--indigo-soft);
}

.notify-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
  cursor: pointer;
}
.notify-consent input {
  margin: 0.2rem 0 0;
  flex-shrink: 0;
  accent-color: var(--indigo);
}
.notify-consent span { color: var(--ink-2); }

/* Brevo honeypot — must stay in the form, hidden from humans */
.notify-honeypot,
.input--hidden {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.notify-note {
  margin-top: 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Brevo AJAX success / error panels (keep ids/classes Brevo expects) */
.sib-form-message-panel {
  display: none;
  margin: 0 0 1rem;
  padding: 0.9rem 1.05rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 0.94rem;
  line-height: 1.45;
}
.sib-form-message-panel p {
  margin: 0;
}

.notify-message-success {
  color: #b8f0cc;
  background: rgba(19, 206, 102, 0.12);
  border-color: rgba(19, 206, 102, 0.35);
}

.notify-message-error {
  color: #ffc4c4;
  background: rgba(255, 73, 73, 0.12);
  border-color: rgba(255, 73, 73, 0.35);
}

.notify-loader-icon {
  display: none;
  width: 1em;
  height: 1em;
  fill: currentColor;
  animation: notify-spin 0.8s linear infinite;
}

/* Brevo toggles loader visibility while submitting */
.sib-form-block__button-with-loader .notify-loader-icon:not(.sib-hide-loader-icon) {
  display: inline-block;
}

@keyframes notify-spin {
  to { transform: rotate(360deg); }
}

/* Code window visual */

.coming-visual {
  animation: rise 0.7s var(--ease) 0.12s both;
}

.window {
  margin: 0;
  background: var(--pit);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 32px 72px -24px rgba(0, 0, 0, 0.8);
  animation: window-float 6.5s var(--ease) infinite;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.72rem 1.2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.window-dots { display: inline-flex; gap: 6px; }
.window-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.window-title {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.window-tag {
  margin-left: auto;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--indigo-bright);
  white-space: nowrap;
}

.code {
  margin: 0;
  padding: 1.25rem 1.4rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: #dbe1f0;
  tab-size: 4;
}

.code code {
  font-size: 1em;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: inherit;
  white-space: pre;
}

.code .k { color: #97a7ff; }
.code .t { color: #6fd6ff; }
.code .f { color: #c4b3ff; }
.code .s { color: #a8e6c1; }
.code .c { color: #5d6883; font-style: italic; }

/* Facts */

.coming-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
  margin-top: 4.25rem;
  animation: rise 0.7s var(--ease) 0.22s both;
}
.coming-facts > div {
  border-top: 2px solid var(--line-strong);
  padding-top: 1rem;
}
.coming-facts dt {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--indigo-bright);
  margin-bottom: 0.3rem;
}
.coming-facts dd { font-size: 0.95rem; color: var(--ink-2); }

/* --------------------------------------------------------------- Footer */

.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ----------------------------------------------------------- Motion */

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

@keyframes badge-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(102, 115, 255, 0);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(102, 115, 255, 0.12);
  }
}

@keyframes window-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes grid-drift {
  from { background-position: 0 0; }
  to { background-position: 44px 44px; }
}

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

@media (max-width: 1024px) {
  .coming-grid { grid-template-columns: minmax(0, 1fr); gap: 3rem; }
  .coming-visual { max-width: 40rem; }
  .coming-facts { gap: 1.75rem; margin-top: 3.5rem; }
}

@media (max-width: 760px) {
  .coming-soon { padding: 3.5rem 0 3.25rem; }

  .notify-form { flex-direction: column; }
  .notify-form .btn { width: 100%; }

  .coming-facts { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }

  .footer-base { flex-direction: column; }
}
