/* Case Converter in the Vorpal Digital design system (Electric Bauhaus).
   Tokens and shared components match mailDNS. Dark Graphite is the default; [data-theme=light] switches to Fog. */
@font-face { font-family: 'Geist'; src: url('/fonts/Geist-Variable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/fonts/GeistMono-Variable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --page: #0A0C0F; --card: #101317; --raised: #15191E;
  --line: #15191E; --line-2: #21272E; --line-3: #4E5763;
  --faint: #7A838F; --muted: #9AA3AE; --body: #C2C9D1; --strong: #F2F4F6;
  --signal: #D4EC5E; --signal-ink: #0A0C0F; --mark: #D4EC5E; --focus: rgba(212,236,94,.18);
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: dark;
}
[data-theme=light] {
  --page: #F6F7F5; --card: #FFFFFF; --raised: #EEF0ED;
  --line: #E2E5E1; --line-2: #CDD1CC; --line-3: #9AA3AE;
  --faint: #646C77; --muted: #4E5763; --body: #21272E; --strong: #0A0C0F;
  --mark: #5C6E10; --focus: rgba(92,110,16,.18);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--body); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--strong); text-decoration-color: var(--line-3); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { color: var(--strong); font-weight: 600; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--raised); color: var(--strong); padding: 0.1em 0.4em; border-radius: 4px; overflow-wrap: anywhere; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--mark); outline-offset: 2px; }
.label, .eyebrow { font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.tick-mark { display: inline-block; width: 5px; height: 5px; background: var(--mark); flex: none; }

/* header */
.wrap, main, .foot-in { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.top { border-bottom: 1px solid var(--line); }
.top-in { max-width: 1120px; margin: 0 auto; padding: 0 32px; height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--strong); font-weight: 600; font-size: 19px; letter-spacing: -0.035em; }
.by { font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.nav { display: flex; align-items: center; gap: 8px; }
.nav a { font-size: 13px; color: var(--faint); text-decoration: none; padding: 8px 10px; transition: color .2s var(--ease); }
.nav a:hover { color: var(--strong); }
.icon-btn { width: 36px; height: 36px; border-radius: 6px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; padding: 0; transition: color .2s var(--ease), border-color .2s var(--ease); }
.icon-btn:hover { color: var(--strong); border-color: var(--line-3); }
.icon-btn svg { width: 16px; height: 16px; }
.i-moon { display: none; }
[data-theme=light] .i-moon { display: block; }
[data-theme=light] .i-sun { display: none; }

/* hero */
.hero { padding: 56px 0 8px; display: flex; flex-direction: column; gap: 18px; max-width: 760px; }
.hero .eyebrow { display: flex; align-items: center; gap: 10px; margin: 0; }
h1 { margin: 0; font-size: clamp(32px, 5vw, 44px); line-height: 1.08; letter-spacing: -0.03em; }
.lede { margin: 0; font-size: 16px; color: var(--faint); max-width: 620px; }
.hero-slim { padding: 48px 0 16px; }

/* case modes: a segmented control */
.tool { padding-top: 32px; }
.modes { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--card); margin-bottom: 16px; }
.mode-btn { font: 500 14px var(--sans); height: 36px; padding: 0 14px; border-radius: 5px; border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease); }
.mode-btn:hover { color: var(--strong); background: var(--raised); }
.mode-btn.active { background: var(--signal); color: var(--signal-ink); }
[data-theme=light] .mode-btn.active { background: var(--strong); color: var(--page); }

/* input / output panels */
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line-2); border-radius: 10px; padding: 16px; }
.panel-out { border-radius: 2px; }
.panel-out .c { position: absolute; width: 10px; height: 10px; border: 0 solid var(--mark); }
.panel-out .c1 { top: -1px; left: -1px; border-width: 1.5px 0 0 1.5px; }
.panel-out .c2 { top: -1px; right: -1px; border-width: 1.5px 1.5px 0 0; }
.panel-out .c3 { bottom: -1px; left: -1px; border-width: 0 0 1.5px 1.5px; }
.panel-out .c4 { bottom: -1px; right: -1px; border-width: 0 1.5px 1.5px 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; min-height: 38px; }
.panel-head .label { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.actions { display: flex; gap: 8px; }
textarea { width: 100%; height: 300px; resize: vertical; font: 14px/1.6 var(--mono); padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--page); color: var(--strong); transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
textarea:focus { outline: none; border-color: var(--mark); box-shadow: 0 0 0 3px var(--focus); }
::placeholder { color: var(--faint); }
.meta { margin-top: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-variant-numeric: tabular-nums; }

/* drop overlay */
.drop-overlay { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; gap: 10px; border: 1.5px dashed var(--mark); border-radius: 10px; background: color-mix(in srgb, var(--card) 88%, transparent); color: var(--strong); font: 600 17px var(--sans); letter-spacing: -0.015em; pointer-events: none; }
.panel.dragging .drop-overlay { display: flex; }

/* buttons */
.btn-small { font: 500 14px var(--sans); height: 38px; padding: 0 16px; border-radius: 6px; border: 1px solid var(--line-3); background: var(--raised); color: var(--strong); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; line-height: 1.2; transition: border-color .2s var(--ease), background .2s var(--ease); }
.btn-small:hover { border-color: var(--strong); }
.btn-primary { font: 600 14px var(--sans); height: 38px; padding: 0 20px; border-radius: 6px; border: 0; background: var(--signal); color: var(--signal-ink); cursor: pointer; transition: background .2s var(--ease); }
.btn-primary:hover { background: #E3F38A; }
.btn-primary.done, .btn-small.done { background: var(--strong); color: var(--page); border-color: var(--strong); }
.icon-btn.sq { width: 38px; height: 38px; }
.icon-btn.sq svg { width: 17px; height: 17px; }
.hint { margin: 12px 0 0; font-size: 12.5px; color: var(--faint); }

/* explainer */
.explain { margin-top: 72px; border-top: 1px solid var(--line); padding: 32px 0 10px; }
.explain h2 { font-size: 20px; letter-spacing: -0.02em; margin: 40px 0 10px; }
.explain h2:first-child { margin-top: 0; }
.explain dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.explain dl div { display: flex; flex-direction: column; gap: 8px; }
.explain dt { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.explain dd { margin: 0; font-size: 14px; }
.explain p { max-width: 680px; }

/* footer with Built with pills */
.foot { border-top: 1px solid var(--line); margin-top: 48px; }
.foot-in { padding-top: 28px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 10px; font-size: 12.5px; color: var(--faint); }
.foot p { margin: 0; }
.foot a { color: var(--body); }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 4px; padding: 0; list-style: none; }
.tools li { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 6px; border-radius: 999px; font-size: 12.5px; border: 1px solid var(--line-2); color: var(--muted); }
.tools .tools-label { border: 0; padding: 4px 4px 4px 0; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.tools img { width: 18px; height: 18px; display: block; }
.tools .logo-bg { background: #fff; border-radius: 5px; padding: 2px; }

/* legal pages */
.legal { max-width: 680px; padding: 8px 0; }
.legal h2 { font-size: 20px; letter-spacing: -0.02em; margin: 36px 0 8px; }
.legal ul { padding-left: 22px; }
.legal li { margin: 5px 0; }

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

@media (max-width: 720px) {
  .wrap, main, .foot-in, .top-in { padding-left: 20px; padding-right: 20px; }
  .top-in { height: 56px; }
  .by, .nav a { display: none; }
  .hero { padding-top: 36px; }
  .tool { padding-top: 24px; }
  .modes { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .panels { grid-template-columns: 1fr; }
  textarea { height: 200px; }
  .explain { margin-top: 48px; }
}
