/* =========================
   TimeQualia – Mobile-first
   ========================= */

/* ---------- Design tokens / theme variables ---------- */

:root {
    /* Light theme (default) */
    --bg: #f3f4f6;
    --bg-soft: #e5e7eb;
    --header-bg: #1d4ed8;
    --header-bg-soft: #2563eb;
    --header-text: #ffffff;

    --card-bg: #ffffff;
    --card-border: #e5e7eb;
    --card-shadow: 0 10px 25px rgba(15, 23, 42, 0.12),
                   0 1px 2px rgba(15, 23, 42, 0.04);

    --text-main: #1f2937;
    --text-muted: #4b5563;
    --text-soft: #6b7280;

    --input-bg: #f9fafb;
    --input-border: #d1d5db;
    --input-placeholder: #9ca3af;
    --input-text: #111827;

    --primary: #2563eb;
    --primary-soft: #eff6ff;
    --primary-gradient-start: #4f46e5;
    --primary-gradient-end: #2563eb;
    --primary-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);

    --danger: #dc2626;
    --danger-soft: #fee2e2;

    --focus-outline: #facc15;

    --border-radius-card: 16px;
    --border-radius-pill: 999px;
    --transition-fast: 0.15s ease;
    --transition-bounce: 0.08s ease;

    --font-sans: "Segoe UI", "Helvetica Neue", Arial, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Dark theme overrides – add class="theme-dark" on <body> via JS */
body.theme-dark {
    --bg: #020617;
    --bg-soft: #0b1120;
    --header-bg: #020617;
    --header-bg-soft: #020617;
    --header-text: #e5e7eb;

    --card-bg: #020617;
    --card-border: #1f2937;
    --card-shadow: 0 18px 40px rgba(15, 23, 42, 0.8);

    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --text-soft: #6b7280;

    --input-bg: #020617;
    --input-border: #1f2937;
    --input-placeholder: #6b7280;
    --input-text: #e5e7eb;

    --primary-soft: rgba(37, 99, 235, 0.12);
}

/* High-contrast overrides – add class="hc-mode" on <body> */
body.hc-mode {
    --bg: #ffffff;
    --bg-soft: #ffffff;
    --header-bg: #000000;
    --header-bg-soft: #000000;
    --header-text: #ffffff;

    --card-bg: #ffffff;
    --card-border: #000000;
    --card-shadow: none;

    --text-main: #000000;
    --text-muted: #111827;
    --text-soft: #374151;

    --input-bg: #ffffff;
    --input-border: #000000;
    --input-placeholder: #4b5563;
    --input-text: #000000;

    --primary: #0000ff;
    --primary-soft: #dbeafe;
    --primary-gradient-start: #0000ff;
    --primary-gradient-end: #0000ff;
    --primary-shadow: none;

    --danger: #b91c1c;
}

/* ---------- Global resets ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    background: linear-gradient(180deg, var(--bg-soft), var(--bg));
    color: var(--text-main);
}

/* Wrapper that keeps content centred and narrow */
.page-wrapper {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

/* ---------- Visually hidden helper ---------- */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Skip link ---------- */

.skip-link {
    position: absolute;
    left: -999px;
    top: 0.75rem;
    z-index: 50;
    padding: 0.4rem 0.8rem;
    background: #ffffff;
    color: #111827;
    border-radius: var(--border-radius-pill);
    border: 2px solid var(--primary);
    font-size: 0.9rem;
}

.skip-link:focus {
    left: 1rem;
}

/* ---------- Header / blue bar ---------- */

.site-header {
    background: linear-gradient(135deg, var(--header-bg), var(--header-bg-soft));
    color: var(--header-text);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
}

.site-header .page-wrapper {
    padding-top: 1.4rem;
    padding-bottom: 1.2rem;
}

.site-header h1 {
    margin: 0;
    font-size: 2rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.site-header p {
    margin: 0.4rem 0 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

/* ---------- Theme / accessibility toggles ---------- */

.mode-toggle-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.mode-toggle {
    border-radius: var(--border-radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(15, 23, 42, 0.12);
    color: #f9fafb;
    padding: 0.25rem 0.7rem;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}

.mode-toggle span {
    font-size: 0.85em;
}

/* Example "active" state (JS can toggle .is-active) */
.mode-toggle.is-active {
    background: #ffffff;
    color: #111827;
}

/* ---------- Section header inside content ---------- */

header {
    margin-bottom: 1rem;
}

header h1 {
    margin: 0 0 0.35rem;
    font-size: 1.6rem;
}

header p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ---------- Cards (neumorphic) ---------- */

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius-card);
    padding: 1.1rem 1.2rem 1.25rem;
    margin-bottom: 1.3rem;
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    position: relative;
}

/* soft/lifted highlight (neumorphic-style) */
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 10% 10%, rgba(255,255,255,0.45), transparent 55%);
    opacity: 0.15;
    pointer-events: none;
}

.card h2 {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ---------- Alerts ---------- */

.alert {
    border-radius: var(--border-radius-pill);
    padding: 0.6rem 0.9rem;
    margin: 0 0 0.9rem;
    font-size: 0.88rem;
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}

.alert .icon {
    font-size: 1.1rem;
}

.alert.success {
    background: rgba(22, 163, 74, 0.08);
    color: #14532d;
    border: 1px solid rgba(34, 197, 94, 0.5);
}

.alert.error {
    background: rgba(248, 113, 113, 0.09);
    color: #7f1d1d;
    border: 1px solid rgba(248, 113, 113, 0.6);
}

.alert.error ul {
    margin: 0;
    padding-left: 1.1rem;
}

/* ---------- Form – mobile first ---------- */

.book-form {
    display: flex;
    flex-direction: column; /* single column by default */
    gap: 0.7rem;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-soft);
}

.required {
    color: #dc2626;
}

input[type="text"],
select,
textarea {
    border-radius: var(--border-radius-pill);
    border: 1px solid var(--input-border);
    padding: 0.65rem 0.9rem;
    min-height: 44px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--input-bg);
    color: var(--input-text);
    transition: border-color var(--transition-fast),
                box-shadow var(--transition-fast),
                background var(--transition-fast),
                transform var(--transition-bounce);
}

textarea {
    border-radius: 14px;
    resize: vertical;
    min-height: 70px;
}

input::placeholder,
textarea::placeholder {
    color: var(--input-placeholder);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
    background: #ffffff;
    transform: translateY(-1px);
}

/* stronger focus-visible for keyboard users */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--focus-outline);
    outline-offset: 2px;
}

/* ---------- Buttons ---------- */

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.3rem;
}

button {
    border: none;
    cursor: pointer;
    border-radius: var(--border-radius-pill);
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    color: #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    transition: transform var(--transition-bounce),
                box-shadow 0.12s ease,
                opacity 0.12s ease;
    box-shadow: var(--primary-shadow);
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.55);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.65);
}

button.secondary {
    background: #e5e7eb;
    border: 1px solid #cbd5e1;
    color: var(--text-main);
    box-shadow: none;
}

.btn-small {
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    box-shadow: none;
}

.btn-danger {
    background: var(--danger);
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

/* ---------- List header ---------- */

.list-header {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 0.6rem;
}

.list-header h2 {
    margin: 0;
    font-size: 1rem;
}

.list-count {
    font-size: 0.8rem;
    color: var(--text-soft);
}

.search-wrapper {
    width: 100%;
}

#search-input {
    width: 100%;
}

/* ---------- Books grid (tile layout) ---------- */

/* Container region */
.table-wrapper {
    margin-top: 0.5rem;
}

/* Turn table body into a responsive grid of tiles */
#books-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

/* Hide header visually but keep for screen readers */
#books-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}

/* Grid for the tiles */
#books-table tbody {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

/* Each row becomes a card tile */
#books-table tr {
    background: var(--card-bg);
    border-radius: 14px;
    border: 1px solid var(--card-border);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    padding: 0.7rem 0.9rem 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

/* Reset table cell defaults */
#books-table td {
    display: block;
    padding: 0.12rem 0;
    border: 0;
    font-size: 0.86rem;
    color: var(--text-main);
}

/* Title row emphasised */
#books-table td:first-child {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Notes cell gets extra top margin */
.notes-cell {
    margin-top: 0.3rem;
    color: var(--text-muted);
}

/* Actions form in a row */
.actions-cell {
    margin-top: 0.35rem;
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

/* ---------- Old "book-card" classes (for future use) ---------- */
/* Kept for compatibility if you later move away from <table> markup */

.books-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.book-card {
    border-radius: 14px;
    padding: 0.75rem 0.8rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

/* Status colour variations – used for chips if you add them later */

.status-owned {
    border-color: rgba(34, 197, 94, 0.5);
    color: #166534;
}

.status-wishlist {
    border-color: rgba(251, 191, 36, 0.7);
    color: #92400e;
}

.status-borrowed-out {
    border-color: rgba(248, 113, 113, 0.8);
    color: #b91c1c;
}

.status-borrowed-from {
    border-color: rgba(59, 130, 246, 0.8);
    color: #1d4ed8;
}

/* ---------- Footer ---------- */

footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-soft);
}


.tq-footer-bar {
  margin-top: 2rem;
  padding: 1.25rem 1rem 1.75rem;
  font-size: 0.85rem;
  color: #6b7280;
  background: transparent;
}

.tq-footer-inner {
  max-width: 980px;
  margin: 0 auto;
  border-top: 1px solid rgba(148, 163, 184, 0.45);
  padding-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.tq-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: "Georgia", "Times New Roman", serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: #4b5563;
}

.tq-footer-emblem {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 0%, #fef3c7, #b45309);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.4);
  font-size: 1.1rem;
}

.tq-footer-links { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.tq-footer-pill {
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #374151;
  transition: background 0.16s ease, transform 0.1s ease, box-shadow 0.16s ease;
}

.tq-footer-pill:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(148, 163, 184, 0.55);
}

.tq-footer-pill-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: transparent;
  color: #eef2ff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.6);
}

.tq-footer-pill-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

@media (max-width: 640px) {
  .tq-footer-inner { flex-direction: column; align-items: flex-start; }
}








/* ---------- Mobile tweaks ---------- */

@media (max-width: 639px) {
    .page-wrapper {
        max-width: 100%;
        padding: 1rem 0.75rem 2.5rem;
    }

    .card {
        padding: 1rem;
        border-radius: 14px;
    }

    .form-actions {
        justify-content: center;
    }

    .form-actions button {
        width: 100%;      /* full-width Save button on phones */
    }

    /* Books grid: 1 column on small screens */
    #books-table tbody {
        grid-template-columns: 1fr;
    }
}

/* ---------- Desktop / tablet enhancements ---------- */

@media (min-width: 1024px) {
    .page-wrapper {
        padding-top: 2rem;
    }

    .list-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .search-wrapper {
        max-width: 260px;
    }
}

/* ---------- Respect prefers-reduced-motion ---------- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
.title-with-cover {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.book-cover {
    width: 36px;
    height: 54px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.35);
    flex-shrink: 0;
}
/* ==============================================
   TimeQualia landing page – Ancient Greek library
   ============================================== */

.landing-body {
    background: radial-gradient(circle at top, #f5f7ff 0, #eef1f7 30%, #dde2f0 60%, #cfd6ea 100%);
    color: #111827;
}

/* Header bar */

.greek-header {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.35);
}

.greek-title {
    margin: 0;
    padding-top: 0.8rem;
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #f9fafb;
}

.greek-small {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    opacity: 0.9;
}

.greek-subtitle {
    margin: 0.4rem 0 1rem;
    color: #e5e7eb;
    font-size: 0.9rem;
}

/* Main hero layout – mobile first */

.landing-main {
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
}

.hero-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Left panel – copy & buttons */

.hero-panel {
    background: #f9fafb;
    border-radius: 22px;
    padding: 1.4rem 1.3rem 1.5rem;
    box-shadow:
        0 18px 40px rgba(15, 23, 42, 0.18),
        0 0 0 1px rgba(148, 163, 184, 0.35);
}

.hero-heading {
    margin: 0 0 0.6rem;
    font-size: 1.25rem;
    font-weight: 650;
    color: #111827;
}

.hero-text {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    color: #4b5563;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.feature-pill {
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    background: rgba(37, 99, 235, 0.06);
    color: #1d4ed8;
    border: 1px solid rgba(37, 99, 235, 0.18);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 0.85rem;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 0.65rem 1.4rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
}

.hero-btn-primary {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #f9fafb;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.6);
}

.hero-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.75);
}

.hero-btn-secondary {
    background: #f3f4f6;
    color: #1f2937;
    border: 1px solid #d1d5db;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.hero-btn-secondary:hover {
    background: #e5e7eb;
}

.hero-footnote {
    margin: 0;
    font-size: 0.8rem;
    color: #6b7280;
}

/* Right panel – Greek temple illustration */

.hero-temple-wrapper {
    text-align: center;
}

.hero-temple {
    position: relative;
    margin-inline: auto;
    max-width: 360px;
    border-radius: 22px;
    padding: 1rem 0.75rem 1.25rem;
    background: radial-gradient(circle at 20% 0, #e5edff, #f9fafb 55%);
    box-shadow:
        inset 0 0 0 1px rgba(148, 163, 184, 0.45),
        0 18px 38px rgba(15, 23, 42, 0.25);
    overflow: hidden;
}

/* “Sky” behind the temple */

.temple-sky {
    position: absolute;
    inset: 0 0 55% 0;
    background: linear-gradient(180deg, #bfdbfe 0, #eff6ff 60%, transparent 100%);
    z-index: 1;
}

/* Pediment + columns */

.temple-pediment {
    position: relative;
    z-index: 2;
    margin: 0 auto 0.35rem;
    width: 76%;
    height: 40px;
    background: linear-gradient(180deg, #e5e7eb, #d1d5db);
    clip-path: polygon(0 100%, 50% 0, 100% 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.pediment-label {
    font-size: 0.55rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #4b5563;
    margin-bottom: 6px;
}

.temple-columns {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
    width: 86%;
    height: 80px;
}

.temple-column {
    width: 11%;
    border-radius: 999px;
    background: linear-gradient(180deg, #f9fafb 0, #e5e7eb 40%, #d1d5db 100%);
    box-shadow:
        inset 1px 0 0 rgba(255, 255, 255, 0.7),
        inset -1px 0 0 rgba(148, 163, 184, 0.7);
}

/* Steps + lamps + scrolls */

.temple-steps {
    position: relative;
    z-index: 2;
    margin: 0.4rem auto 0;
    width: 92%;
    height: 18px;
    background: linear-gradient(180deg, #e5e7eb, #cbd5e1);
    border-radius: 8px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 4px 10px rgba(15, 23, 42, 0.35);
}

.temple-lamp {
    position: absolute;
    bottom: 28px;
    width: 16px;
    height: 24px;
    border-radius: 999px 999px 6px 6px;
    background: linear-gradient(180deg, #fbbf24, #b45309);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.9);
    z-index: 3;
}

.lamp-left {
    left: 18%;
}

.lamp-right {
    right: 18%;
}

.temple-scrolls {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 3;
}

.scroll {
    width: 18px;
    height: 10px;
    border-radius: 99px;
    background: linear-gradient(90deg, #facc15, #fef9c3);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.3);
}

/* Caption */

.hero-temple-caption {
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: #4b5563;
}

/* Secondary section */

.landing-secondary {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.landing-secondary-title {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    font-weight: 650;
    color: #111827;
}

.landing-secondary-grid {
    display: grid;
    gap: 0.8rem;
}

.landing-secondary-card {
    padding: 0.85rem 0.9rem;
    border-radius: 18px;
    background: #f9fafb;
    box-shadow:
        0 10px 24px rgba(15, 23, 42, 0.16),
        0 0 0 1px rgba(148, 163, 184, 0.35);
}

.landing-secondary-card h3 {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
}

.landing-secondary-card p {
    margin: 0;
    font-size: 0.85rem;
    color: #4b5563;
}

/* Footer */

.landing-footer {
    padding: 1.2rem 0 1.8rem;
    text-align: center;
    font-size: 0.78rem;
    color: #6b7280;
}

/* Responsive: tablet & up */

@media (min-width: 768px) {
    .landing-main {
        padding-top: 2rem;
        padding-bottom: 3rem;
    }

    .hero-grid {
        flex-direction: row;
        align-items: stretch;
        gap: 1.75rem;
    }

    .hero-panel,
    .hero-temple-wrapper {
        flex: 1;
    }

    .hero-panel {
        padding: 1.7rem 1.6rem 1.8rem;
    }

    .hero-heading {
        font-size: 1.45rem;
    }

    .landing-secondary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Responsive: large screens */

@media (min-width: 1024px) {
    .greek-title {
        font-size: 1.9rem;
    }

    .hero-temple {
        max-width: 420px;
    }
}

/* ========================================
   Scroll-in animations hooks
   ======================================== */

[data-animate] {
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
}

[data-animate][data-animate="fade-down"] {
    transform: translateY(-12px);
}

[data-animate][data-animate="fade-down"].is-visible {
    transform: translateY(0);
}
/* ======= Landing page – Ancient Greek theme ======= */

.landing-body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top left, #e5efff 0, #dfe7f5 35%, #cfd7ef 65%, #cad3eb 100%);
    color: #111827;
}

/* Header bar */

.landing-header {
    background: linear-gradient(120deg, #143a7b, #2457c8);
    color: #f9fafb;
    padding: 0.85rem 0;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.45);
}

.landing-header-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.landing-logo .logo-medallion {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 20%, #fff8e7 0, #f9e0a2 40%, #c3953e 100%);
    box-shadow:
        0 0 0 2px rgba(249, 250, 251, 0.9),
        0 12px 18px rgba(15, 23, 42, 0.55);
    font-size: 1.3rem;
}

.landing-title-block {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.landing-title {
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.landing-subtitle {
    margin: 0;
    font-size: 0.8rem;
    color: #cbd5f5;
}

/* Hero */

.landing-main {
    padding: 1.75rem 1rem 3rem;
}

.landing-hero {
    background: rgba(248, 250, 252, 0.98);
    border-radius: 26px;
    box-shadow:
        0 18px 40px rgba(15, 23, 42, 0.18),
        0 0 0 1px rgba(148, 163, 184, 0.25);
    padding: 1.6rem 1.4rem 1.7rem;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1.4rem;
    align-items: stretch;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(14px);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 400ms ease-out, transform 400ms ease-out;
}

.landing-body.landing-ready .landing-hero {
    opacity: 1;
    transform: translateY(0);
}

.hero-col {
    position: relative;
    z-index: 1;
}

.hero-copy h2 {
    margin-top: 0;
    margin-bottom: 0.3rem;
    font-size: 1.5rem;
    letter-spacing: 0.03em;
}

.hero-copy p {
    margin-top: 0.25rem;
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

.hero-feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
}

.hero-feature-list li {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.olive-icon {
    width: 1.2rem;
    height: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eef2ff;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

/* Reusable buttons for links on landing */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.6rem 1.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform 0.08s ease, box-shadow 0.12s ease, background 0.15s ease, color 0.15s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #f9fafb;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.45);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.6);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 5px 14px rgba(37, 99, 235, 0.7);
}

.btn-ghost {
    background: transparent;
    color: #1e293b;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.9);
}

.btn-ghost:hover {
    background: rgba(226, 232, 240, 0.6);
}

.hero-note {
    margin: 0.1rem 0 0;
    font-size: 0.82rem;
    color: #6b7280;
}

/* Hero visual – temple & books */

.hero-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    position: relative;
}

.temple {
    width: 100%;
    max-width: 320px;
    background: linear-gradient(180deg, #f4f5fb, #e5e7f5);
    border-radius: 20px;
    padding: 0.75rem 0.6rem 0.8rem;
    box-shadow: 0 14px 30px rgba(148, 163, 184, 0.45);
    position: relative;
}

.temple-roof {
    height: 14px;
    border-radius: 14px 14px 4px 4px;
    background: linear-gradient(120deg, #f9a826, #f97316);
    box-shadow: 0 3px 8px rgba(180, 83, 9, 0.45);
    margin: 0 auto 0.3rem;
}

.temple-frieze {
    text-align: center;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #4b5563;
    margin-bottom: 0.3rem;
}

.temple-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.3rem;
    align-items: stretch;
    margin-bottom: 0.4rem;
}

.temple-columns .column {
    background: linear-gradient(180deg, #e5e7f5, #cbd5f5);
    border-radius: 999px;
    box-shadow:
        inset 0 0 0 1px rgba(148, 163, 184, 0.7),
        0 4px 8px rgba(148, 163, 184, 0.35);
}

.temple-shelf {
    background: linear-gradient(180deg, #e5e7f5, #d1d5e8);
    border-radius: 999px;
    height: 46px;
    margin: 0 auto 0.35rem;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    padding: 0 0.4rem;
    position: relative;
    overflow: hidden;
}

.floating-book {
    width: 36px;
    height: 30px;
    border-radius: 4px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    box-shadow: 0 4px 10px rgba(180, 83, 9, 0.6);
    position: relative;
}

.floating-book::before {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 2px;
    background: repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.6) 0,
        rgba(255, 255, 255, 0.6) 4px,
        transparent 4px,
        transparent 8px
    );
    opacity: 0.7;
}

.book-two {
    background: linear-gradient(135deg, #38bdf8, #2563eb);
}

.book-three {
    background: linear-gradient(135deg, #22c55e, #15803d);
}

.temple-base {
    height: 10px;
    border-radius: 6px;
    background: linear-gradient(180deg, #d1d5e1, #9ca3af);
    margin: 0 auto;
}

.olive-branch {
    position: absolute;
    width: 90px;
    height: 90px;
    background-image: radial-gradient(circle at 10% 20%, #16a34a 0, #22c55e 35%, transparent 60%);
    filter: blur(0.3px);
    opacity: 0.7;
}

.olive-branch-left {
    left: -20px;
    top: 10px;
    border-radius: 80% 30% 60% 20%;
}

.olive-branch-right {
    right: -30px;
    bottom: 0;
    border-radius: 20% 70% 30% 80%;
}

.hero-caption {
    margin: 0;
    font-size: 0.73rem;
    color: #6b7280;
    text-align: center;
}

/* Footer */

.landing-footer {
    padding: 1rem 0 1.6rem;
    text-align: center;
    font-size: 0.78rem;
    color: #6b7280;
}

/* Mobile-first tweaks */

@media (max-width: 768px) {
    .landing-main {
        padding-top: 1.3rem;
    }

    .landing-hero {
        grid-template-columns: minmax(0, 1fr);
        padding: 1.3rem 1.1rem 1.4rem;
    }

    .hero-actions {
        justify-content: flex-start;
    }

    .hero-visual {
        margin-top: 0.4rem;
    }

    .landing-header-inner {
        align-items: flex-start;
    }

    .landing-title {
        font-size: 1rem;
    }
}
