/* ─── GATEWAY (potomitan.eu root) ─────────────────────
   Chooser between Advisory and Studio. Shares brand tokens
   with the studio; the Advisory panel previews its light theme. */
:root {
  --bg:        #08080f;
  --surface:   #12121c;
  --border:    #2a2a3a;
  --accent:    #C9A84C;
  --accent-dim:#8a6f2e;
  --text:      #E8E8E0;
  --muted:     #8b8b9a;
  --pill:      #1f1f30;

  --adv-bg:     #F7F6F2;
  --adv-navy:   #0B1F3A;
  --adv-text:   #14213D;
  --adv-muted:  #5B6478;
  --adv-gold:   #B8932F;

  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'DM Serif Display', Georgia, serif;
  --radius-lg: 20px;
  --max-w: 1100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  background-image: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(201,168,76,0.08), transparent 60%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }

[data-lang="fr"] .en,
[data-lang="en"] .fr { display: none; }

/* header */
.gw-header {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gw-brand { display: flex; align-items: center; gap: 10px; }
.gw-brand img { height: 44px; width: auto; }
.gw-wordmark {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.lang-toggle {
  display: flex;
  background: var(--pill);
  border-radius: 999px;
  padding: 3px;
  border: 1px solid var(--border);
}
.lang-btn {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 12px; font-weight: 600;
  letter-spacing: 0.05em; color: var(--muted);
  padding: 4px 12px; border-radius: 999px; transition: all .2s;
}
.lang-btn.active { background: var(--accent); color: var(--bg); }

/* body */
.gw {
  flex: 1;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3rem;
}
.gw-intro { text-align: center; max-width: 640px; margin: 0 auto; }
.gw-tag {
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.25rem;
}
.gw h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.1;
  margin-bottom: 1.25rem;
}
.gw h1 em { font-style: italic; color: var(--accent); }
.gw-sub { color: var(--muted); font-size: 1.05rem; }
.gw-sub em { font-style: italic; color: var(--text); }

.gw-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.gw-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 340px;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.gw-panel:hover { transform: translateY(-4px); }
.gw-panel-kicker {
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600;
}
.gw-panel-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  line-height: 1.15;
}
.gw-panel-desc { font-size: 0.95rem; line-height: 1.7; max-width: 38ch; }
.gw-panel-cta {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 600; font-size: 0.9rem;
}
.gw-panel-cta svg { transition: transform .2s; }
.gw-panel:hover .gw-panel-cta svg { transform: translateX(4px); }

/* Advisory panel — light preview of the corporate site */
.gw-panel--advisory {
  background: var(--adv-bg);
  color: var(--adv-text);
  border-color: transparent;
  background-image:
    linear-gradient(rgba(11,31,58,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,31,58,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
}
.gw-panel--advisory .gw-panel-kicker { color: var(--adv-gold); }
.gw-panel--advisory .gw-panel-title  { color: var(--adv-navy); }
.gw-panel--advisory .gw-panel-desc   { color: var(--adv-muted); }
.gw-panel--advisory .gw-panel-cta    { color: var(--adv-navy); }
.gw-panel--advisory:hover { box-shadow: 0 20px 60px rgba(247,246,242,0.12); }

/* Studio panel — the dark brand */
.gw-panel--studio {
  background: var(--surface);
  background-image: radial-gradient(ellipse 80% 60% at 100% 100%, rgba(201,168,76,0.14), transparent 60%);
}
.gw-panel--studio .gw-panel-kicker { color: var(--accent); }
.gw-panel--studio .gw-panel-title  { color: var(--text); }
.gw-panel--studio .gw-panel-title  { font-style: italic; }
.gw-panel--studio .gw-panel-desc   { color: var(--muted); }
.gw-panel--studio .gw-panel-cta    { color: var(--accent); }
.gw-panel--studio:hover { border-color: var(--accent-dim); box-shadow: 0 20px 60px rgba(201,168,76,0.10); }

/* footer */
.gw-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: var(--max-w); width: 100%; margin: 0 auto;
}
.footer-links { display: flex; gap: 1.5rem; list-style: none; }
.footer-links a { font-size: 0.8rem; color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 0.8rem; color: var(--muted); }

@media (max-width: 768px) {
  .gw { padding: 2rem 1rem 3rem; gap: 2.25rem; }
  .gw-header { padding: 1rem; }
  .gw-panels { grid-template-columns: 1fr; }
  .gw-panel { min-height: 0; padding: 1.75rem; }
  .gw-footer { flex-direction: column; text-align: center; padding: 1.5rem 1rem; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 1rem; }
}

/* ─── LOGIN LINK + MODAL ─────────────────────────────── */
.gw-header-right { display: flex; align-items: center; gap: 1rem; }
.gw-login-link {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: none; border: 1px solid var(--border); border-radius: 999px;
  color: var(--muted); font-family: var(--font-body); font-size: 12px; font-weight: 600;
  letter-spacing: 0.05em; padding: 5px 12px; cursor: pointer; transition: all .2s;
}
.gw-login-link:hover { color: var(--text); border-color: var(--accent-dim); }
.gw-login-link svg { opacity: 0.7; }

body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(8,8,15,0.78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal-card {
  position: relative;
  width: 100%; max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem 2rem;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  animation: modal-in .18s ease-out;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute; top: 0.75rem; right: 0.9rem;
  background: none; border: none; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.modal-close:hover { color: var(--text); }
.modal-logo { height: 40px; width: auto; margin: 0 auto 1.25rem; }
.modal-form { display: flex; flex-direction: column; }
.modal-form[hidden] { display: none; }
.modal-form h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; text-align: center; margin-bottom: 0.25rem; }
.modal-sub { font-size: 0.82rem; color: var(--muted); text-align: center; margin-bottom: 1.5rem; }
#login-form h2 { margin-bottom: 1.5rem; } /* no subtitle under the sign-in heading */
.modal-form label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.35rem; }
.modal-form input {
  font-family: var(--font-body); font-size: 0.95rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 0.7rem 0.85rem; width: 100%; margin-bottom: 1rem;
  transition: border-color .2s, box-shadow .2s;
}
.modal-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201,168,76,0.15); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 2.6rem; }
.pw-toggle {
  position: absolute; right: 0.6rem; top: 0.55rem;
  width: 26px; height: 26px; border: none; background: none; cursor: pointer; opacity: 0.55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E8E8E0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  background-size: 18px; background-repeat: no-repeat; background-position: center;
}
.pw-toggle.is-on { opacity: 1; }
.btn-modal {
  margin-top: 0.25rem;
  background: var(--accent); color: var(--bg);
  border: none; border-radius: 999px; padding: 0.8rem 1.2rem;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; cursor: pointer;
  transition: background .2s, transform .2s;
}
.btn-modal:hover { background: #d4b46a; transform: translateY(-1px); }
.modal-link {
  margin-top: 1rem; background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 0.82rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px;
}
.modal-link:hover { color: var(--text); }

@media (max-width: 480px) {
  .gw-login-link span { display: none; }
  .gw-login-link { padding: 6px 8px; }
  .modal-card { padding: 1.75rem 1.25rem 1.5rem; }
}
