/* ============================================================
   ESOGÜ — simple academic document access page
   Plain CSS only. No frameworks, no external dependencies.
   ============================================================ */

:root {
  --bg: #dfe4ea;
  --bg-docs: #e3e8ee;
  --white: #ffffff;
  --text: #2f3640;
  --text-muted: #7f8a99;
  --border: #c4ccd6;
  --green: #27ae60;
  --green-hover: #219a54;
  --danger: #c0392b;
  --dark: #2f3640;
  --radius: 6px;
  --shadow: 0 4px 18px rgba(47, 54, 64, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.page {
  min-height: 100dvh;
  background: var(--bg);
}

/* ----------------------------- Access page ----------------- */

.access {
  max-width: 460px;
  margin: 0 auto;
  padding: clamp(70px, 8vh, 90px) 1.25rem 3rem;
  text-align: center;
}

/* Logo sits directly on the gray background — no card, no box. */
.access__logo-area {
  background: transparent;
  margin-bottom: 1.5rem;
}

.access__logo {
  width: 260px;
  max-width: 75%;
  height: auto;
  margin: 0 auto;
  background: transparent;
  object-fit: contain;
}

.access__title {
  margin: 0 0 2rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.access__form {
  display: inline-block;
}

.access__row {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.5rem;
}

/* ----------------------------- Captcha box ----------------- */

.captcha {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 0.5rem 0.9rem;
  font-size: 1.3rem;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.06em;
  color: #5a6472;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.6);
  background-color: #eef1f5;
  /* subtle gray noise + line effect, CSS only */
  background-image:
    repeating-linear-gradient(
      115deg,
      rgba(120, 130, 145, 0.10) 0,
      rgba(120, 130, 145, 0.10) 1px,
      transparent 1px,
      transparent 5px
    ),
    radial-gradient(rgba(120, 130, 145, 0.18) 1px, transparent 1px),
    radial-gradient(rgba(120, 130, 145, 0.12) 1px, transparent 1px);
  background-size: auto, 4px 4px, 6px 6px;
  background-position: 0 0, 0 0, 2px 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  user-select: none;
  transform: skewX(-4deg);
}

.access__input {
  width: 130px;
  padding: 0.5rem 0.75rem;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.access__input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.16);
}

.access__input.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.14);
}

.access__hint {
  margin: 0.85rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.access__error {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--danger);
}

.access__link-error {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--danger);
}

/* ----------------------------- Buttons --------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: translateY(1px);
}

.btn--green {
  margin-top: 1.5rem;
  padding: 0.6rem 1.5rem;
  color: #fff;
  background: var(--green);
}

.btn--green:hover {
  background: var(--green-hover);
}

/* ----------------------------- Language buttons ------------ */

.lang {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 1.25rem;
}

.lang__btn {
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  background: #d6dbe2;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.lang__btn:first-child {
  border-radius: var(--radius) 0 0 var(--radius);
}

.lang__btn:last-child {
  border-radius: 0 var(--radius) var(--radius) 0;
  border-left: none;
}

.lang__btn--active {
  color: #fff;
  background: var(--dark);
  border-color: var(--dark);
}

/* ----------------------------- Documents page -------------- */

.page--docs {
  background: var(--bg-docs);
}

.docs {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vh, 2.5rem) 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* Respect the hidden attribute (author display rule would otherwise win). */
.docs[hidden] {
  display: none;
}

.docs__item {
  margin: 0;
  width: 100%;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.75rem;
}

.docs__img {
  width: 100%;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
  margin: 0 auto;
  cursor: zoom-in;
}

/* ----------------------------- Lightbox -------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2.5rem);
  background: rgba(20, 24, 30, 0.9);
}

.lightbox[hidden] {
  display: none;
}

.lightbox__img {
  max-width: 100%;
  max-height: 92vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lightbox__close {
  position: absolute;
  top: clamp(0.75rem, 3vw, 1.5rem);
  right: clamp(0.75rem, 3vw, 1.5rem);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.18s ease;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* ----------------------------- Small screens --------------- */

@media (max-width: 360px) {
  .access__input {
    width: 110px;
  }
}
