@import url('https://fonts.googleapis.com/css2?family=Anonymous+Pro:wght@400;700&display=swap');

@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.18s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --left-margin: 26.04vw; /* 500px / 1920px */

    --dark-blue: #3F5C81;
    --light-blue: #80A6D7;
    --gray: #666666;
    --bg: #F6F6F6;
    --white: #FFFFFF;
    --hairline: rgba(102, 102, 102, 0.2);
}

body {
    font-family: 'Anonymous Pro', monospace;
    background-color: var(--bg);
    color: var(--gray);
    min-height: 100vh;
    padding-bottom: 6rem;
    display: flex;
    align-items: center;
}

a {
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--dark-blue);
    outline-offset: 2px;
}

.container {
    width: 100%;
    padding: 2rem;
    margin-left: var(--left-margin);
}

/* ---------------------------------------------------------
   Back link
--------------------------------------------------------- */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 2rem;
    color: var(--dark-blue);
    font-size: clamp(14px, 0.9vw, 18px);
    font-weight: 700;
    text-decoration: none;
}

.back-link .arrow {
    transition: transform 0.2s ease;
}

.back-link:hover .arrow {
    transform: translateX(-4px);
}

/* ---------------------------------------------------------
   Hero
--------------------------------------------------------- */

.hero {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 2.5rem;
}

.hero--top {
    align-items: flex-start;
}

.title {
    background: linear-gradient(to right,
        var(--dark-blue) 0%,
        var(--light-blue) 45%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: clamp(32px, 2.5vw, 48px);
    font-weight: 500;
    margin-bottom: 0;
    text-align: left;
}

.subtitle {
    color: var(--gray);
    font-size: clamp(20px, 1.4vw, 28px);
    font-weight: 400;
    margin-bottom: 0.5rem;
    text-align: left;
}

.note {
    color: var(--gray);
    font-size: clamp(14px, 0.83vw, 16px);
    font-style: italic;
    opacity: 0.8;
    text-align: left;
}

code {
    font-family: inherit;
    font-style: normal;
    background: rgba(102, 102, 102, 0.1);
    padding: 0.05em 0.4em;
}

/* ---------------------------------------------------------
   Verify form
--------------------------------------------------------- */

.verify-form {
    max-width: 480px;
    margin-bottom: 2.5rem;
}

.field-label {
    display: block;
    color: var(--gray);
    font-size: clamp(12px, 0.8vw, 14px);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.field-row {
    display: flex;
    gap: 1rem;
}

.field-input {
    flex: 1;
    min-width: 0;
    font-family: inherit;
    font-size: clamp(15px, 1vw, 18px);
    color: var(--dark-blue);
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--hairline);
    padding: 0.5rem 0.1rem;
    transition: border-color 0.2s ease;
}

.field-input::placeholder {
    color: var(--gray);
    opacity: 0.5;
}

.field-input:hover {
    border-bottom-color: var(--gray);
}

.field-input:focus {
    outline: none;
    border-bottom-color: var(--dark-blue);
}

.form-error {
    margin-top: 0.75rem;
    font-size: clamp(13px, 0.8vw, 15px);
    color: var(--gray);
    font-style: italic;
}

/* ---------------------------------------------------------
   Buttons & arrow links
--------------------------------------------------------- */

.shop-button {
    font-family: inherit;
    font-weight: 700;
    font-size: clamp(14px, 0.9vw, 16px);
    color: var(--white);
    background-color: var(--dark-blue);
    border: none;
    padding: 0.5rem 1.25rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.shop-button:hover {
    background-color: var(--light-blue);
}

.view-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--light-blue);
    font-weight: 700;
    font-size: clamp(14px, 0.9vw, 16px);
    text-decoration: none;
    transition: color 0.2s ease;
}

.view-link:hover {
    color: var(--dark-blue);
}

.view-link .arrow {
    font-size: 1.3em;
    transition: transform 0.2s ease;
}

.view-link:hover .arrow {
    transform: translateX(4px);
}

/* ---------------------------------------------------------
   Result
--------------------------------------------------------- */

.empty-state {
    max-width: 480px;
}

.result-block {
    max-width: 480px;
    animation: fade-in 0.2s ease;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.result-id-label {
    font-size: clamp(12px, 0.8vw, 14px);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 0.3rem;
}

.result-id-value {
    font-size: clamp(20px, 1.4vw, 26px);
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 0.4rem;
}

.status-text {
    display: inline-block;
    font-weight: 700;
    font-size: clamp(13px, 0.85vw, 15px);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.status-valid .status-text {
    color: var(--dark-blue);
}

.status-expired .status-text,
.status-revoked .status-text,
.status-not-found .status-text {
    color: var(--gray);
}

.result-details {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.detail-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--hairline);
}

.detail-row:first-child {
    border-top: 1px solid var(--hairline);
}

.detail-label {
    font-size: clamp(13px, 0.85vw, 15px);
    color: var(--gray);
    opacity: 0.8;
    flex-shrink: 0;
}

.detail-value {
    font-size: clamp(14px, 0.9vw, 16px);
    color: var(--gray);
    font-weight: 700;
    text-align: right;
}

.result-message {
    font-size: clamp(14px, 0.9vw, 16px);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.result-link {
    margin-bottom: 1.5rem;
}

.result-reset {
    background: none;
    border: none;
    padding: 0;
    color: var(--gray);
    font-family: inherit;
    font-size: clamp(13px, 0.85vw, 15px);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.result-reset:hover {
    color: var(--dark-blue);
}

/* ---------------------------------------------------------
   Footer
--------------------------------------------------------- */

.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 1rem 2rem 1rem var(--left-margin);
    background-color: var(--bg);
    font-size: clamp(11px, 0.75vw, 13px);
    color: var(--gray);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--dark-blue);
}

/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */

@media screen and (max-width: 1024px) {
    :root {
        --left-margin: 15vw;
    }

    .container {
        padding: 1.5rem;
    }
}

@media screen and (max-width: 768px) {
    :root {
        --left-margin: 5vw;
    }

    .container {
        padding: 1rem;
    }

    .title {
        font-size: 36px;
    }

    .subtitle {
        font-size: 22px;
    }

    .field-row {
        flex-direction: column;
        align-items: stretch;
    }

    .shop-button {
        width: 100%;
    }

    .detail-row {
        flex-direction: column;
        gap: 0.2rem;
    }

    .detail-value {
        text-align: left;
    }
}

@media screen and (max-width: 375px) {
    :root {
        --left-margin: 1rem;
    }

    .title {
        font-size: 32px;
    }

    .subtitle {
        font-size: 18px;
    }
}
