/* ============================================================
   SEOTECH INDONESIA — Demo Gate (/demo/index.html)
   Shares the visual language of each client demo (cream / sage /
   Fraunces + Inter + IBM Plex Mono) but lives as its own file —
   editing this never touches any client folder's own css/js.
   ============================================================ */

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

:root {
  --cream: #F4F2EC;
  --cream-2: #EBE7DC;
  --paper: #FFFFFF;
  --ink: #1B2A28;
  --ink-70: rgba(27, 42, 40, .7);
  --ink-50: rgba(27, 42, 40, .5);
  --sage: #4F7A6E;
  --sage-dark: #3D6459;
  --sage-tint: #E4ECE8;
  --border: #DBD5C6;
  --rust: #A8432E;
  --rust-tint: #FBEAE4;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 24px 60px -28px rgba(27, 42, 40, .35);
  --ease: cubic-bezier(.4, 0, .2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
}

a { color: inherit; }

::selection { background: var(--sage-tint); color: var(--sage-dark); }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2.5px solid var(--sage);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.demo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 48px;
}

.demo-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.demo-logo .mark { width: 26px; height: 26px; display: block; }
.demo-logo .mark svg { width: 100%; height: 100%; display: block; }

.demo-logo .word {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: .01em;
}
.demo-logo .word b { font-weight: 600; }

.back-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink-70);
  font-size: .88rem;
  font-weight: 500;
  transition: color .18s var(--ease);
}
.back-link:hover { color: var(--sage-dark); }

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

.demo-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 48px 110px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 80px;
  align-items: start;
}

/* ---------- Context / pitch column ---------- */

.dc-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: 18px;
}

.demo-context h1 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(2rem, 3.1vw, 2.75rem);
  line-height: 1.14;
  letter-spacing: -.01em;
  max-width: 480px;
  margin-bottom: 20px;
}

.dc-lede {
  font-size: 1.04rem;
  line-height: 1.62;
  color: var(--ink-70);
  max-width: 460px;
  margin-bottom: 44px;
}

.dc-included { display: flex; flex-direction: column; }

.dc-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 19px 0;
  border-top: 1px solid var(--border);
}

.di-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--sage-tint);
  color: var(--sage-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .92rem;
}

.dc-item strong {
  display: block;
  font-size: .97rem;
  font-weight: 600;
  margin-bottom: 3px;
}

.dc-item span {
  display: block;
  font-size: .87rem;
  line-height: 1.55;
  color: var(--ink-70);
}

/* ---------- Login card ---------- */

.demo-login-wrap {
  display: flex;
  justify-content: center;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 40px 36px;
}

.login-card h2 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.5rem;
  margin-bottom: 7px;
}

.lc-sub {
  font-size: .87rem;
  line-height: 1.55;
  color: var(--ink-70);
  margin-bottom: 26px;
}

.lc-error {
  display: none;
  align-items: flex-start;
  gap: 10px;
  background: var(--rust-tint);
  color: var(--rust);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: .83rem;
  line-height: 1.5;
  margin-bottom: 20px;
}
.lc-error.is-visible { display: flex; }
.lc-error i { margin-top: 2px; flex-shrink: 0; }

.lc-group { margin-bottom: 18px; }

.lc-group label {
  display: block;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .01em;
  margin-bottom: 7px;
  color: var(--ink);
}

.lc-input-wrap { position: relative; }

.lc-leading {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-50);
  font-size: .85rem;
  pointer-events: none;
}

.lc-input-wrap input {
  width: 100%;
  padding: 13px 15px 13px 42px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: .92rem;
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.lc-input-wrap input::placeholder { color: var(--ink-50); }
.lc-input-wrap input:focus {
  outline: none;
  border-color: var(--sage);
  background: var(--paper);
}

#loginPass { padding-right: 42px; }

.lc-toggle-pass {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  color: var(--ink-50);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .16s var(--ease), background .16s var(--ease);
}
.lc-toggle-pass:hover { color: var(--ink); background: var(--cream-2); }

.lc-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 6px;
  padding: 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--sage);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: .94rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s var(--ease), transform .12s var(--ease), opacity .18s var(--ease);
}
.lc-submit:hover { background: var(--sage-dark); }
.lc-submit:active { transform: scale(.98); }
.lc-submit:disabled { cursor: default; }
.lc-submit[data-state="success"] { background: var(--sage-dark); }

.lc-hint {
  margin-top: 22px;
  text-align: center;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--ink-70);
}
.lc-hint a { color: var(--sage-dark); font-weight: 600; text-decoration: none; }
.lc-hint a:hover { text-decoration: underline; }

/* ---------- Error shake ---------- */

@media (prefers-reduced-motion: no-preference) {
  .shake { animation: shakeX .42s var(--ease); }
}
@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .demo-header { padding: 20px; }
  .demo-main {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 8px 20px 64px;
  }
  .demo-context h1 { max-width: 100%; }
  .dc-lede { max-width: 100%; }
  .login-card { padding: 32px 26px; }
}

@media (max-width: 420px) {
  .demo-header { padding: 16px; }
  .demo-logo .word { font-size: .95rem; }
  .back-link span { display: none; }
}
