@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,600;1,400&display=swap');

/* AutoRemind Berkeley Theme */
:root {
    --olive: #002676;
    --olive-dark: #001a52;
    --gold: #FDB515;
    --gold-dark: #C4820A;
    --pale: #fff3cc;
    --text: #0e0e0e;
    --muted: #6b6b6b;
    --line: #e6e6e6;

    /* Form controls */
    --dot-size: 16px;
    --dot-border: 2px;
    --label-gap: 10px;
}

* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    background: #fff;
}

h1, h2 {
    font-family: 'EB Garamond', Georgia, serif;
}

.container {
    width: min(1100px, 92vw);
    margin: 0 auto;
}

/* --- Navigation (Responsive) --- */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--olive);
    border-bottom: none;
    padding: 16px 0;
}

.nav__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    font-size: 26px;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    letter-spacing: .2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand img {
    height: 60px;
    width: auto;
}

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

.nav__links {
    display: flex;
    gap: 22px;
    align-items: center;
}

.nav__link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.88);
    font-size: 15px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.nav__link:hover {
    text-decoration: underline;
    text-decoration-color: var(--gold);
    text-underline-offset: 3px;
    color: #fff;
}

.nav__link--active {
    font-weight: 600;
    color: #fff;
    text-decoration: underline;
    text-decoration-color: var(--gold);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

/* Nav text elements on blue background */
.nav #user-email,
.nav #admin-email {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Nav Buttons */
.btn {
    border: 0;
    cursor: pointer;
    font-weight: 600;
    border-radius: 999px;
    padding: 10px 16px;
    text-decoration: none;
    font-size: 15px;
    display: inline-block;
}

.btn--primary {
    background: var(--gold);
    color: #1a1a1a;
    padding: 12px 20px;
}

.btn--primary:hover {
    background: #FFCA2B;
    color: #1a1a1a;
}

.btn--outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
}

.btn--outline:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.nav .btn--outline {
    color: rgba(255, 255, 255, 0.88);
    border-color: rgba(255, 255, 255, 0.35);
}

.nav .btn--outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.65);
    color: #fff;
}

/* Responsive Nav Toggle */
.nav__toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
    .nav__links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--olive);
        flex-direction: column;
        align-items: center;
        padding: 24px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        gap: 20px;
        z-index: 99;
    }

    .nav.nav--open .nav__links {
        display: flex;
    }

    .nav__toggle {
        display: block;
    }
}

/* Blur / Lock State */
.blur-container {
    position: relative;
    transition: filter 0.3s ease;
}

.is-locked .blur-target {
    filter: blur(5px);
    pointer-events: none;
    opacity: 0.6;
    user-select: none;
}

.lock-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    width: 100%;
    display: none;
}

.is-locked .lock-overlay {
    display: block;
}

.lock-overlay .btn--cta {
    box-shadow: 0 4px 12px rgba(253, 181, 21, 0.4);
    transform: scale(1.1);
}

/* --- Hero --- */
.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 48px 0 24px;
    width: 100%;
}

.hero h1 {
    font-size: clamp(28px, 5vw, 42px);
    margin: 0;
    font-weight: 500;
}

/* Feature List */
.hero-features {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.hero-feature {
    font-size: 14px;
    color: var(--olive-dark);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-feature svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
    flex-shrink: 0;
}

.hero-feature-sep {
    color: var(--muted);
    font-size: 14px;
    line-height: 1;
}

/* --- Dividers & Pills --- */
.divider {
    position: relative;
    height: 32px;
    margin: 28px 0 20px;
}

.divider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--line);
    transform: translateY(-50%);
}

.pill {
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    top: 50%;
    background: var(--pale);
    color: #5c3d00;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .04);
    font-size: 14px;
}

/* --- Grid Layout --- */
.grid {
    display: grid;
    gap: 40px;
    align-items: start;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-bottom: 40px;
}

@media (max-width: 820px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    /* Hide scroll arrow — not needed on mobile */
    .scroll-arrow-wrap {
        display: none !important;
    }

    /* First screen: don't force full height on mobile */
    .first-screen {
        min-height: auto;
    }

    /* Hero */
    .hero {
        margin: 24px 0 16px;
    }

    .hero-features {
        gap: 8px;
        margin-top: 14px;
    }

    .hero-feature-sep {
        display: none;
    }

    .hero-features {
        flex-direction: column;
        align-items: center;
    }

    /* Settings form */
    .first-screen .grid {
        gap: 12px;
    }

    .first-screen .cta-wrap {
        margin: 8px 0 12px;
    }

    .days-input-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Preview rows: stack on small screens */
    .preview-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .preview-due {
        text-align: left;
    }

    /* Modals: slide up from bottom */
    .modal-overlay {
        align-items: flex-end;
    }

    .modal-content {
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        padding: 28px 20px 32px;
        margin: 0;
    }

    /* Footer spacing */
    .site-footer {
        padding-bottom: 28px;
    }
}

.label {
    margin: 10px 0 12px;
    font-weight: 600;
    display: block;
}

/* --- Checkbox Channels --- */
.channels {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.channels li {
    display: block;
}

.channels label {
    display: flex;
    align-items: center;
    gap: var(--label-gap);
    cursor: pointer;
    user-select: none;
}

.channels input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.dot {
    width: var(--dot-size);
    height: var(--dot-size);
    border-radius: 3px;
    display: inline-block;
    background: #fff;
    border: var(--dot-border) solid #a8c4e0;
    transition: all .15s;
    position: relative;
}

.channels input[type="checkbox"]:focus+.dot {
    outline: 2px solid #a8c4e0;
    outline-offset: 2px;
}

.channels input[type="checkbox"]:checked+.dot {
    background: var(--gold);
    border-color: var(--gold);
}

.channels input[type="checkbox"]:checked+.dot::after {
    content: "✓";
    position: absolute;
    color: #1a1a1a;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Channel Expansion Fields */
.channel-field {
    display: none;
    /* JS toggles this */
    width: 100%;
    margin: 8px 0 0 0;
    padding: 10px 12px;
    font-size: 15px;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.channel-field:focus {
    outline: 2px solid #a8c4e0;
    border-color: #a8c4e0;
}

/* --- Sliders & Inputs --- */
.slider-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.minmax {
    font-size: 14px;
    color: #333;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: var(--line);
    border-radius: 999px;
    outline: none;
    border: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--gold-dark);
    cursor: pointer;
    margin-top: 0;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--gold-dark);
    cursor: pointer;
}

.days-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.num-input {
    width: 72px;
    appearance: textfield;
    -moz-appearance: textfield;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 15px;
}

.num-input:focus {
    outline: 2px solid #a8c4e0;
    border-color: #a8c4e0;
}

/* --- Footer / Background --- */
.cta-wrap {
    display: flex;
    justify-content: center;
    margin: 32px 0 36px;
}

.btn--cta {
    background: var(--gold);
    color: #1a1a1a;
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 16px;
    border: 0;
    cursor: pointer;
    font-weight: 600;
}

.btn--cta:hover {
    background: #FFCA2B;
    color: #1a1a1a;
}

.arc-bg {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: 130vw;
    height: 160px;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    background: var(--olive);
    margin-top: 40px;
}

.site-footer {
    text-align: center;
    margin: -100px auto 0;
    padding: 0 0 36px;
    position: relative;
    background: transparent !important;
    color: rgba(255, 255, 255, 0.8);
}

.thanks {
    color: var(--gold);
    font-weight: 600;
}

.feedback {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.85);
}

/* Link styles */
a {
    color: inherit;
    text-decoration: none;
}

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.32);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 90vw;
    width: 400px;
    padding: 32px 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    text-align: center;
}

.modal-content h2 {
    margin-top: 0;
    color: var(--text);
}

/* First Screen */
.first-screen {
    min-height: calc(100vh - 92px);
    display: flex;
    flex-direction: column;
}

.first-screen .hero {
    margin: 20px 0 12px;
}

.first-screen .hero-features {
    margin-top: 14px;
}

.first-screen .grid {
    gap: 20px;
    padding-bottom: 16px;
}

.first-screen .divider {
    margin: 14px 0 10px;
}

.first-screen .cta-wrap {
    margin: 10px 0 16px;
}

/* Scroll Arrow */
.scroll-arrow-wrap {
    display: flex;
    justify-content: center;
    padding-bottom: 24px;
    margin-top: auto;
}

.scroll-arrow-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--olive);
    padding: 8px;
    animation: arrow-bounce 2s ease-in-out infinite;
    display: flex;
    align-items: center;
}

.scroll-arrow-btn:hover {
    color: var(--olive-dark);
}

@keyframes arrow-bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(8px); }
}

/* Assignments Preview (home page) */
.assignments-preview {
    margin-bottom: 40px;
}

.preview-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    gap: 16px;
}

.preview-row:last-child {
    border-bottom: none;
}

.preview-name {
    font-weight: 600;
    font-size: 15px;
}

.preview-course {
    font-size: 13px;
    color: var(--muted);
    margin-top: 2px;
}

.preview-due {
    font-size: 13px;
    font-weight: 600;
    color: var(--olive-dark);
    white-space: nowrap;
    text-align: right;
}

.preview-due.overdue {
    color: #b94a48;
}

.preview-view-all {
    font-size: 14px;
    font-weight: 600;
    color: var(--olive);
    text-decoration: none;
}

.preview-view-all:hover {
    text-decoration: underline;
}

/* Login/About Specifics */
.login-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    flex-grow: 1;
    text-align: center;
    height: 60vh;
}

.about-block {
    margin-bottom: 32px;
}

.about-block h2 {
    color: var(--olive);
    font-size: 24px;
    margin-bottom: 12px;
}

.highlight {
    color: var(--olive);
    font-weight: 600;
}
