/* iMark landing page — page-level styles layered on Nocturne. */

html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--color-bg); color: var(--color-text); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-300); }
.nav a.btn-primary { color: var(--color-accent); }

@keyframes imSweep { 0% { top: 2%; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: 90%; opacity: 0; } }
@keyframes imType { from { width: 0; } to { width: 100%; } }
@keyframes imPop { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes imSlideIn { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes imPulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-accent) 45%, transparent); } 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--color-accent) 0%, transparent); } }
@keyframes imFlow { to { stroke-dashoffset: -28; } }
@keyframes imFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes imBar { from { width: 0; } }
@keyframes imPan { from { transform: translateY(var(--pan-from)); } to { transform: translateY(var(--pan-to)); } }
@keyframes imFade { from { opacity: 0; } }
@keyframes imDrift { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(2%, -3%) scale(1.08); } }

/* FAQ disclosure */
summary::-webkit-details-marker { display: none; }
summary i { transition: transform .25s ease; }
details[open] summary i { transform: rotate(45deg); }

/* Assessment: option buttons and inputs (replaces the design runtime's hover/focus attributes) */
.qa-opt { text-align: left; cursor: pointer; font: inherit; font-size: 14px; color: var(--color-text); background: color-mix(in srgb, var(--color-text) 4%, transparent); border: 1px solid var(--color-divider); border-radius: var(--radius-md); padding: 15px 16px; transition: all .18s ease; }
.qa-opt:hover { background: color-mix(in srgb, var(--color-accent) 14%, transparent); border-color: var(--color-accent); transform: translateY(-2px); }
.qa-input { font: inherit; font-size: 14px; color: var(--color-text); background: color-mix(in srgb, var(--color-text) 5%, transparent); border: 1px solid var(--color-divider); border-radius: var(--radius-sm); padding: 12px 13px; outline: none; width: 100%; }
.qa-input:focus { border-color: var(--color-accent); }
.qa-input::placeholder { color: color-mix(in srgb, var(--color-text) 35%, transparent); }
.qa-hidden { display: none; }

/* Responsive adjustments for phone widths */
@media (max-width: 900px) {
  .nav-link { display: none; }
}
@media (max-width: 600px) {
  .grid-2-sm-1 { grid-template-columns: 1fr !important; }
  .nav .btn-primary { font-size: 13px; padding: 7px 10px; }
}

/* Without JS, or with reduced motion, show everything immediately */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal], [data-node], [data-stackimg] { opacity: 1 !important; transform: none !important; transition: none !important; }
  [data-railfill] { width: 100% !important; transition: none !important; }
  [data-glow], .phone-float, [data-anim], svg line { animation: none !important; }
}

/* Back-to-top button (js/back-to-top.js) */
.to-top { position: fixed; right: clamp(16px, 3vw, 28px); bottom: clamp(16px, 3vw, 28px); z-index: 60; width: 46px; height: 46px; display: grid; place-items: center; padding: 0; cursor: pointer; color: var(--color-accent); background: color-mix(in srgb, #161826 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--color-accent); border-radius: 50%; box-shadow: 0 8px 24px rgba(0,0,0,.45); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s, bottom .25s ease, background .2s ease; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity .25s ease, transform .25s ease, visibility 0s, bottom .25s ease, background .2s ease; }
.to-top:hover { background: color-mix(in srgb, var(--color-accent) 18%, #161826); }
.to-top:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }

/* Language menu (generated by i18n/build.py) */
.lang { position: relative; }
.lang summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; letter-spacing: .04em; color: var(--color-text); padding: 7px 10px; border: 1px solid var(--color-divider); border-radius: var(--radius-md); user-select: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary .ph-globe { font-size: 16px; }
.lang summary:hover, .lang[open] summary { border-color: var(--color-accent); color: var(--color-accent); }
.lang-caret { font-size: 11px; transition: transform .2s ease; }
.lang[open] .lang-caret { transform: rotate(180deg); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 170px; margin: 0; padding: 6px; list-style: none; background: color-mix(in srgb, #161826 97%, transparent); backdrop-filter: blur(14px); border: 1px solid var(--color-divider); border-radius: var(--radius-md); box-shadow: var(--shadow-md); z-index: 60; }
.nav .lang-menu a { display: block; padding: 9px 12px; border-radius: 6px; font-size: 14px; color: var(--color-text); text-decoration: none; }
.nav .lang-menu a:hover { background: color-mix(in srgb, var(--color-accent) 14%, transparent); color: var(--color-accent); }
.nav .lang-menu a[aria-current="page"] { color: var(--color-accent); }
.nav .lang-menu a[aria-current="page"]::after { content: " ✓"; }
@media (max-width: 600px) { .lang summary { padding: 6px 8px; } .lang summary .lang-caret { display: none; } }
