/* Halldin & Co Gateway -- the hub/login/materials-frame shell. Design tokens
   (palette/type) live in halldin-tokens.css, shared verbatim across every
   Halldin section (see that file's own header) -- imported here, everything
   below is this gateway's own page styling built on those tokens. */
@import url("halldin-tokens.css");

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

/* -- Login -- */

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius);
  padding: 40px 36px;
  text-align: center;
}

.login-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: block;
}

.login-card h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: 0.02em;
  margin: 0 0 4px;
  color: var(--ink);
}

.login-card p.subtitle {
  margin: 0 0 28px;
  color: var(--ink-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.login-card input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--surface-line);
  background: var(--surface-raised);
  color: var(--ink);
  font-size: 15px;
  margin-bottom: 14px;
}

.login-card input[type="password"]:focus {
  outline: none;
  border-color: var(--gold);
}

.login-card button {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: none;
  background: var(--gold);
  color: var(--ground);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.login-card button:hover {
  background: var(--gold-bright);
}

.login-error {
  color: var(--critical);
  background: var(--critical-bg);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 13px;
  margin-bottom: 14px;
}

/* -- Hub -- */

.hub-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 32px 48px;
}

.hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 56px;
}

.hub-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hub-brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.hub-brand h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: 0.02em;
  margin: 0;
}

.hub-brand span {
  display: block;
  color: var(--ink-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-top: 2px;
}

.hub-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-toggle {
  display: flex;
  gap: 4px;
}

.lang-toggle-corner {
  position: fixed;
  top: 20px;
  right: 20px;
}

.lang-btn {
  background: transparent;
  border: 1px solid var(--surface-line);
  color: var(--ink-dim);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.lang-btn.active {
  background: var(--gold);
  color: var(--ground);
  border-color: var(--gold);
  font-weight: 600;
}

.logout-form button {
  background: transparent;
  border: 1px solid var(--surface-line);
  color: var(--ink-dim);
  border-radius: var(--radius);
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
}

.logout-form button:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.section-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.section-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.section-card .eyebrow {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  background: var(--attention-bg);
  border-radius: var(--radius);
  padding: 3px 9px;
  margin-bottom: 18px;
}

.section-card h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  margin: 0 0 10px;
  color: var(--ink);
}

.section-card p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.5;
}

/* -- Materials iframe page -- */

.materials-shell {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.materials-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--surface-line);
  background: var(--surface);
}

.materials-bar a.back {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 13px;
}

.materials-bar a.back:hover {
  color: var(--gold-bright);
}

.materials-bar h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 16px;
  margin: 0;
  letter-spacing: 0.02em;
}

.materials-frame {
  flex: 1;
  border: none;
  width: 100%;
}

/* -- Phones -- */

@media (max-width: 600px) {
  .hub-shell {
    padding: 32px 18px 32px;
  }

  .hub-header {
    margin-bottom: 32px;
  }

  .section-card {
    padding: 24px 20px;
  }

  .login-card {
    padding: 32px 24px;
  }

  .materials-bar {
    padding: 12px 16px;
  }
}
