:root {
    --ink: #17211b;
    --muted: #667268;
    --paper: #f5f4ee;
    --surface: #fffef9;
    --line: #d7ddd3;
    --accent: #d9683c;
    --accent-dark: #a84427;
    --mint: #dce8df;
    --shadow: 0 24px 70px rgba(23, 33, 27, .12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "Segoe UI", Tahoma, sans-serif;
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .34;
    background-image: radial-gradient(#c4cfc4 .7px, transparent .7px);
    background-size: 15px 15px;
    mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

a { color: inherit; }

.site-header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 28px 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    font: 700 1.35rem/1 "Trebuchet MS", sans-serif;
    letter-spacing: .04em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--surface);
    background: var(--ink);
    border-radius: 50% 50% 50% 8px;
    transform: rotate(-12deg);
}

.brand-mark span { transform: rotate(12deg); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.header-user { color: var(--muted); font-size: .9rem; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 3px;
    font: 700 .88rem/1 "Trebuchet MS", sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
}

.button:hover { transform: translateY(-2px); }
.button-primary { color: #fffaf1; background: var(--accent); }
.button-primary:hover { background: var(--accent-dark); }
.button-quiet { color: var(--ink); background: transparent; border-color: var(--line); }
.button-quiet:hover { background: var(--surface); }
.button-danger { color: #8a2d1c; background: transparent; border-color: #e2b4a8; }
.button-danger:hover { color: #fffaf1; background: #a84427; border-color: #a84427; }

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
    gap: clamp(36px, 7vw, 110px);
    align-items: center;
    max-width: 1180px;
    min-height: calc(100vh - 90px);
    margin: 0 auto;
    padding: 60px 28px 110px;
}

.hero-copy { animation: rise-in .7s ease both; }
.hero-kicker {
    margin: 0 0 22px;
    color: var(--accent-dark);
    font: 700 .78rem/1 "Trebuchet MS", sans-serif;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 720px;
    margin: 0;
    font: 400 clamp(3.5rem, 8vw, 7.4rem)/.9 Georgia, serif;
    letter-spacing: 0;
}

.hero h1 em { color: var(--accent); font-style: normal; }
.hero-lede { max-width: 520px; margin: 30px 0 34px; color: var(--muted); font-size: 1.08rem; }

.hero-aside {
    position: relative;
    padding: 28px;
    background: var(--mint);
    box-shadow: var(--shadow);
    animation: rise-in .8s .15s ease both;
}

.hero-aside::before {
    content: "";
    position: absolute;
    top: -14px;
    right: -14px;
    width: 54px;
    height: 54px;
    border: 1px solid var(--accent);
    border-radius: 50%;
}

.hero-aside h2 { margin: 0 0 22px; font: 400 2rem/1.1 Georgia, serif; }
.hero-aside p { margin: 0; color: var(--muted); }
.hero-rule { width: 58px; height: 4px; margin: 0 0 24px; background: var(--accent); }

.modal-backdrop {
    position: fixed;
    z-index: 10;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(23, 33, 27, .5);
}

.modal-backdrop.is-hidden { display: none !important; }

.modal {
    position: relative;
    width: min(100%, 430px);
    padding: 34px;
    background: var(--surface);
    box-shadow: var(--shadow);
    animation: rise-in .25s ease both;
}

.modal h2 { margin: 0 0 7px; font: 400 2.3rem/1 Georgia, serif; }
.modal p { margin: 0 0 24px; color: var(--muted); }
.modal-close { position: absolute; top: 12px; right: 14px; border: 0; background: transparent; color: var(--muted); font-size: 1.5rem; cursor: pointer; }
.form-row { display: grid; gap: 7px; margin-bottom: 17px; }
.form-row label { font: 700 .78rem/1 "Trebuchet MS", sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.form-row input, .form-row textarea { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 2px; color: var(--ink); background: #fff; font: inherit; resize: vertical; }
.form-row input:focus { outline: 2px solid rgba(217, 104, 60, .28); border-color: var(--accent); }
.form-submit { width: 100%; margin-top: 5px; }
.alert { margin: 0 0 18px; padding: 11px 13px; color: #8a2d1c; background: #f9e5df; border-left: 3px solid var(--accent); }

.dashboard-shell { max-width: 1080px; margin: 0 auto; padding: 62px 28px 100px; }
.dashboard-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 38px; }
.dashboard-heading h1 { margin: 0; font: 400 clamp(2.7rem, 5vw, 5rem)/.95 Georgia, serif; }
.dashboard-heading p { margin: 8px 0 0; color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: minmax(260px, .7fr) minmax(0, 1.3fr); gap: 22px; }
.panel { padding: 26px; background: var(--surface); border: 1px solid var(--line); }
.panel h2 { margin: 0 0 20px; font: 400 1.7rem/1.1 Georgia, serif; }
.admin-list { margin: 0; padding: 0; list-style: none; }
.admin-list li { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); }
.admin-details { display: grid; gap: 2px; }
.admin-actions { display: flex; align-items: center; gap: 10px; }
.admin-current { color: var(--muted); font-size: .8rem; }
.admin-actions .button { min-height: 36px; padding: 0 12px; font-size: .76rem; }
.admin-list small { color: var(--muted); }
.dashboard-footer { margin-top: 32px; }

@keyframes rise-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 720px) {
    .site-header { align-items: flex-start; padding: 20px 20px 10px; }
    .header-user { display: none; }
    .hero { display: block; min-height: auto; padding: 72px 20px 90px; }
    .hero h1 { font-size: clamp(3.35rem, 17vw, 6rem); }
    .hero-aside { margin-top: 70px; }
    .dashboard-shell { padding: 44px 20px 70px; }
    .dashboard-heading { display: block; }
    .dashboard-heading .button { margin-top: 20px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .modal { padding: 28px 22px; }
}
