/* Shared chrome + component base for the TownClouds platform shell
   (home page, Create Town wizard, subscription success). Depends on
   ~/css/tokens.css being linked first. */

body, html {
    margin: 0;
    font-family: var(--tc-font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--tc-ink);
    background-color: var(--tc-surface-sunken);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--tc-font-display);
    font-weight: var(--tc-fw-bold);
    line-height: 1.2;
    color: var(--tc-ink);
}

a {
    color: var(--tc-brand-700);
}

::selection {
    background: var(--tc-brand-300);
    color: var(--tc-brand-900);
}

/* ---- nav ---- */
.tc-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: var(--tc-surface);
    border-bottom: 1px solid var(--tc-line);
    position: sticky;
    top: 0;
    z-index: 20;
}

.tc-nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--tc-font-display);
    font-weight: var(--tc-fw-bold);
    font-size: 1.15rem;
    color: var(--tc-brand-600);
    text-decoration: none;
}

.tc-nav-logo {
    height: 34px;
    width: auto;
}

.tc-nav-actions {
    display: flex;
    align-items: center;
    gap: var(--tc-space-4);
}

.tc-nav-link {
    font-size: var(--tc-fs-sm);
    font-weight: var(--tc-fw-medium);
    color: var(--tc-ink-soft);
    text-decoration: none;
}

.tc-nav-link:hover {
    color: var(--tc-ink);
}

/* ---- buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--tc-font-body);
    font-weight: var(--tc-fw-semibold);
    font-size: var(--tc-fs-sm);
    padding: 12px 22px;
    border-radius: var(--tc-radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease, border-color .12s ease;
    text-decoration: none;
    line-height: 1.2;
}

.btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.btn:focus-visible {
    outline: 2px solid var(--tc-brand-500);
    outline-offset: 2px;
}

.btn-sm {
    padding: 7px 14px;
    font-size: var(--tc-fs-xs);
}

.btn-lg {
    padding: 16px 34px;
    font-size: 1.08rem;
    font-weight: var(--tc-fw-bold);
    border-radius: var(--tc-radius-md);
}

.btn-onlight {
    background: #fff;
    color: var(--tc-brand-700);
    box-shadow: var(--tc-shadow-sm);
}

.btn-onlight:hover {
    background: #fff;
    box-shadow: var(--tc-shadow-md);
    color: var(--tc-brand-700);
}

.btn-primary {
    background: var(--tc-brand-600);
    color: #fff;
}

.btn-primary:hover {
    background: var(--tc-brand-700);
    color: #fff;
}

.btn-primary:disabled {
    background: var(--tc-line);
    color: var(--tc-ink-faint);
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    background: transparent;
    color: var(--tc-ink-soft);
    border-color: var(--tc-line);
}

.btn-outline:hover {
    background: transparent;
    border-color: var(--tc-ink-faint);
    color: var(--tc-ink);
}

.btn-success {
    background: var(--tc-success);
    color: #fff;
}

.btn-success:hover {
    background: var(--tc-success);
    filter: brightness(1.06);
    color: #fff;
}

/* ---- footer ---- */
.tc-footer {
    background: var(--tc-brand-900);
    padding: var(--tc-space-6) var(--tc-space-5);
    margin-top: var(--tc-space-8);
}

.tc-footer-inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.tc-footer-logo {
    max-height: 56px;
    margin-bottom: var(--tc-space-3);
}

.tc-footer-inner p {
    color: rgba(255, 255, 255, .75);
    font-size: var(--tc-fs-sm);
    margin: 0;
}

@media (prefers-reduced-motion: reduce) {
    .btn {
        transition: none;
    }
}

/* Bootstrap 4 -> 5: .form-group lost its built-in spacing. Kept as a
   compatibility shim so existing form markup (Contact, Create Town) doesn't
   need every row rewritten just for the Bootstrap version bump. */
.form-group {
    margin-bottom: 1rem;
}
