/* =========================================
   BASE THEME & GLOBAL
   ========================================= */

:root {
  --bg:#020617;          /* deep slate / near-black */
  --fg:#f9fafb;          /* almost white */
  --muted:#e5e7eb;
  --accent:#000000;

  --panel-shadow:0 18px 45px rgba(0,0,0,0.45);

  --radius-card:24px;
  --radius-button:18px;  /* rounded rectangle, not full pill */
}

/* Reset & base */
* {
  box-sizing:border-box;
}

html, body {
  margin:0;
  padding:0;
  color:var(--fg);
  font-family:Inter, "Helvetica Neue", Arial, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  /* stop the page from "overscrolling" past the top bar feeling */
  overscroll-behavior-y:none;
}

/* Global wallpaper (ink JPG) – NO blue overlays */
body {
  position:relative;
  min-height:100vh;
  background-color:#020617;
  background-image:url("../img/bg-ink.jpg");
  background-size:cover;
  background-position:center center;
  background-repeat:no-repeat;
  background-attachment:fixed;
}

/* subtle grid texture overlay */
body::before {
  content:"";
  position:fixed;
  inset:0;
  background-image:radial-gradient(rgba(255,255,255,0.08) 1px, transparent 0);
  background-size:18px 18px;
  opacity:0.18;
  pointer-events:none;
  z-index:0;
}

body > * {
  position:relative;
  z-index:1;
}

.container {
  max-width:1000px;
  margin:0 auto;
  padding:0 24px;
}

/* Make main tall enough so footer doesn’t float halfway up
   and vertically center content on short pages (all pages). */
main {
  min-height:calc(100vh - 180px);
  display:flex;
  flex-direction:column;
  justify-content:center;
}

/* =========================================
   HEADER & NAV
   ========================================= */

header {
  position:sticky;
  top:0;
  /* transparent so wallpaper shows, but with subtle divider */
  background:transparent;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  border-bottom:1px solid rgba(148,163,184,0.35);
  z-index:10;
}

.nav {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
  gap:16px;
}

.brand {
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:600;
  letter-spacing:.2px;
}

.brand img {
  height:28px;
  width:auto;
}

/* Bigger logo on desktop */
@media (min-width: 1024px){
  .brand img { height: 64px; }
  header .nav { padding: 18px 0; }
}

/* FORCE bigger logo on desktop, per design lock */
@media (min-width: 1024px){
  header .brand img.logo { height: 64px !important; }
  header .nav { padding: 18px 0 !important; }
}

nav a {
  text-decoration:none;
  color:#e5e7eb;
  margin-left:16px;
  font-size:15px;
  opacity:.85;
}

nav a:hover {
  opacity:1;
}

/* =========================================
   LIQUID GLASS BASE (APPLE-STYLE)
   ========================================= */

/* Core liquid glass surface:
   We alias .glass, .glass-panel, and .glass-button
   so old markup still works and buttons get the effect too.
*/
.glass,
.glass-panel,
.glass-button {
  position:relative;
  background:rgba(255, 255, 255, 0.14);   /* neutral clear glass */
  backdrop-filter:blur(2px) saturate(180%);
  -webkit-backdrop-filter:blur(2px) saturate(180%);
  border:1px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.55),       /* no blue tint */
    inset 0 4px 18px rgba(255, 255, 255, 0.35);
  overflow:hidden;
}

/* Liquid highlight */
.glass::after,
.glass-panel::after,
.glass-button::after {
  content:''; 
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:rgba(255, 255, 255, 0.1);
  border-radius:inherit;
  backdrop-filter:blur(1px);
  -webkit-backdrop-filter:blur(1px);
  box-shadow:
    inset -10px -8px 0px -11px rgba(255, 255, 255, 1),
    inset 0px -9px 0px -8px rgba(255, 255, 255, 1);
  opacity:0.6;
  z-index:-1;
  filter:blur(1px) drop-shadow(10px 4px 6px black) brightness(115%);
}

/* card-like surfaces get bigger radius */
.hero.glass,
.card.glass,
.chat-shell.glass,
.results-card.glass,
.contact-form.glass,
.translate-shell.glass,
.translator-outer.glass,
.glass-panel {
  border-radius:var(--radius-card);
}

/* =========================================
   UNIFORM GLASS BUTTONS
   ========================================= */

/* Base reset for native buttons */
button {
  font:inherit;
  border:none;
  background:none;
  padding:0;
  margin:0;
  color:inherit;
}

/* One look for every CTA, everywhere */
.glass-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;

  padding:0.45rem 1.1rem;
  border-radius:var(--radius-button);

  color:#ffffff;
  font-size:0.8rem;
  letter-spacing:0.16em;
  text-transform:uppercase;
  text-decoration:none;
  cursor:pointer;
  white-space:nowrap;
}

.glass-button:hover {
  background:rgba(255, 255, 255, 0.25);
}

.glass-button:disabled {
  opacity:0.55;
  cursor:not-allowed;
}

/* Layout tweaks for where buttons live */
.nav .glass-button {
  margin-left:12px;
}

.hero .glass-button {
  margin-top:24px;
}

.translate-actions .glass-button,
.translator-lang .glass-button,
.translator-foot .glass-button,
.chat-input .glass-button,
.contact-form .glass-button {
  display:inline-flex;
}

/* =========================================
   TYPOGRAPHY & BASIC LAYOUT
   ========================================= */

.hero {
  padding:72px 0 48px;
  text-align:center;
}

.hero h1 {
  font-size:36px;
  margin:0 0 8px;
  font-weight:600;
}

.hero p {
  font-size:18px;
  color:var(--muted);
  margin:0;
}

.section {
  padding:40px 0;
}

.card {
  border-radius:var(--radius-card);
  padding:24px;
  color:#e5e7eb;
  margin-left:auto;
  margin-right:auto;
}

/* =========================================
   TRANSLATE / MAIL SHELLS CENTERED
   ========================================= */

.translate-shell,
.chat-shell,
.results-card,
.contact-form {
  margin-left:auto;
  margin-right:auto;
}

/* =========================================
   TRANSLATE PAGE SHELL
   ========================================= */

.translate-shell {
  max-width:960px;
  margin-top:24px;
}

.translate-title {
  text-align:center;
  margin:0;
  font-size:26px;
}

.translate-sub {
  text-align:center;
  margin-top:6px;
  color:var(--muted);
}

/* top button row */
.translate-actions {
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  justify-content:center;
  margin:24px 0 20px;
}

/* hook for translate-specific logic only */
.translate-btn {}

/* =========================================
   TRANSLATOR: CLEAR GLASS OUTER, BLACK INNER TEXTAREAS
   ========================================= */

/* OUTER: CLEAR GLASS FRAME (ALL TRANSLATOR BOXES) */
.translator-outer {
  max-width:960px;
  margin:18px auto 0;

  border-radius:var(--radius-card) !important;
  overflow:hidden;

  /* same clear-glass look as glass-panel */
  background:rgba(255, 255, 255, 0.14);
  backdrop-filter:blur(2px) saturate(180%);
  -webkit-backdrop-filter:blur(2px) saturate(180%);
  border:1px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.55),
    inset 0 4px 18px rgba(255, 255, 255, 0.35);
}

/* Kill the generic glass-panel ::after on this one,
   since we defined its frame explicitly above */
.translator-outer::after {
  content:none;
}

/* INNER: NO BACKGROUND — just a container so outer glass stays visible */
.translator-ui {
  padding:18px 18px 16px;
  color:#f5f5f5;

  background:transparent;
  border-radius:0;
  box-shadow:none;
}

.translator-topbar {
  display:flex;
  justify-content:flex-start;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
}

.translator-lang {
  display:flex;
  gap:8px;
  align-items:center;
  font-size:13px;
}

.translator-lang label {
  display:flex;
  gap:6px;
  align-items:center;
}

.translator-lang select {
  min-width:120px;
  background:#000000;
  color:#f5f5f5;
  border:1px solid rgba(255,255,255,0.25);
  border-radius:10px;
  padding:6px 8px;
}

/* swap button: visuals from glass-button */
.swap-btn {
  font-size:0.9rem;
}

/* layout for text boxes */
.translator-panels {
  display:flex;
  flex-direction:column;
  gap:12px;
}

.translator-box {
  width:100%;
}

/* INNER BLACK BOXES (only these are black now) */
.translator-box textarea {
  width:100%;
  min-height:180px;
  background:#000000;
  border:1px solid rgba(255,255,255,0.18);
  border-radius:12px;
  padding:12px;
  color:#f5f5f5;
  font-family:inherit;
  resize:vertical;
}

.translator-box textarea::placeholder {
  color:#cbd5f5;
}

/* inline buttons spacing; visuals from .glass-button */
.inline-btn {
  margin-top:8px;
}

.translator-foot {
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:12px;
  color:#cbd5f5;
  margin-top:10px;
}

.translator-hint {
  opacity:.75;
}

/* Footnote under translator */
.translate-footnote {
  margin-top:20px;
  font-size:12px;
  color:var(--muted);
  text-align:center;
}

/* =========================================
   MAIL & BILLS RESULTS CARD
   ========================================= */

.results-card {
  max-width:760px;
  margin:16px auto 0;
  border-radius:var(--radius-card);
  padding:14px 16px;
  color:#e5e7eb;
}

.result-row {
  display:flex;
  gap:10px;
  padding:6px 0;
  border-bottom:1px dashed rgba(148,163,184,0.4);
}

.result-row:last-child {
  border-bottom:none;
}

/* =========================================
   ASSISTANT / CHAT PAGE
   ========================================= */

.chat-shell {
  max-width:760px;
  margin:24px auto 0;
  border-radius:var(--radius-card);
  padding:24px;
}

.chat-window {
  background:rgba(0,0,0,0.7);
  color:#f5f5f5;
  border-radius:16px;
  padding:16px;
  min-height:280px;
  max-height:50vh;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:12px;
  box-shadow:0 4px 30px rgba(0,0,0,0.6);
  border:1px solid rgba(255,255,255,0.25);
}

.msg {
  padding:10px 12px;
  border-radius:10px;
  width:fit-content;
  max-width:90%;
}

.msg.user {
  background:#111827;
  align-self:flex-end;
}

.msg.bot {
  background:#020617;
  align-self:flex-start;
}

.chat-input {
  margin-top:12px;
  display:flex;
  gap:10px;
}

.chat-input input {
  flex:1;
  border:1px solid rgba(148,163,184,0.6);
  border-radius:10px;
  padding:10px 12px;
  font-size:15px;
  background:rgba(15,23,42,0.8);
  color:#e5e7eb;
}

/* =========================================
   FOOTER
   ========================================= */

footer {
  border-top:1px solid rgba(148,163,184,0.4);
  margin-top:64px;
  padding:24px 0;
  color:#9ca3af;
  font-size:14px;

  /* let wallpaper show; no heavy bar at bottom */
  background:transparent;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}

small.tagline {
  display:block;
  color:#9ca3af;
  margin-top:2px;
  font-weight:400;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@keyframes fadeIn {
  to { opacity:1; transform:none; }
}

@media (max-width:720px){
  .hero h1 { font-size:28px; }

  .translate-shell {
    padding:0 4px;
  }

  .chat-shell {
    margin-top:16px;
    padding:18px;
  }
}

@media (max-width:640px){
  .translate-actions {
    flex-direction:column;
    align-items:center;
  }

  .translator-foot {
    flex-direction:column;
  }
}
