/* ── Adoptic Web — Shared Styles ──
   Warm aesthetic: navy text, cream background, teal accents
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Idiqlat&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--white); }

:root {
    --navy: #1B2D45;
    --dark-grey: #4A5568;
    --slate: #6B7280;
    --warm-bg: #FFF8F0;
    --white: #FFFFFF;
    --peach-light: #FFE8D6;
    --peach-dark: #FFDDD2;
    --light-grey: #F3F4F6;
    --tan-card: #F0E6D8;
    --teal: #20C9A0;
    --teal-dark: #1A8A68;
    --coral: #FF6B6B;
    --score-5: #0F6B50;
    --score-4: #1A8A68;
    --score-3: #2EAD85;
    --score-2: #73D0B5;
    --score-1: #BDE8DB;
    --score-0: #D8EEE8;
    --bar-empty: #F3F4F6;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--warm-bg);
    color: var(--navy);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 42px;
    padding-bottom: 32px;
}
/* Fixed viewport window frame — white bezel + black rectangle */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    border: 12px solid var(--white);
    pointer-events: none;
    z-index: 9998;
}
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 10px;
    right: 10px;
    height: 100lvh;
    border-left: 2px solid #000;
    border-right: 2px solid #000;
    pointer-events: none;
    z-index: 9999;
}

/* ── NAV ── */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 6px 0;
    z-index: 10000;
    height: 42px;
    display: flex;
    align-items: center;
}
.site-nav::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 10px;
    right: 10px;
    height: 2px;
    background: #000;
    z-index: 10002;
}
.nav-inner {
    padding: 0 32px;
    display: flex;
    align-items: center;
}
.nav-left {
    display: flex;
    align-items: center;
    gap: 0;
    overflow: hidden;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
}
.nav-right {
    display: flex;
    align-items: center;
}
.nav-logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--navy);
    text-decoration: none;
    letter-spacing: -0.5px;
    margin-right: 16px;
}
.nav-logo span {
    color: var(--teal);
}
.nav-user-id {
    font-family: 'Idiqlat', serif;
    font-size: 15px;
    color: var(--slate);
    text-decoration: none;
    transition: color 0.15s;
}
.nav-user-id:hover {
    color: var(--navy);
}
.nav-sep {
    font-family: 'Idiqlat', serif;
    color: var(--slate);
    font-size: 15px;
    margin: 0 3px;
    user-select: none;
}
.nav-crumb {
    font-size: 13px;
    font-weight: 500;
    color: var(--navy);
    padding: 6px 0;
}
a.nav-page {
    font-size: 13px;
    font-weight: 500;
    color: var(--slate);
    text-decoration: none;
    transition: all 0.15s;
    padding: 6px 14px;
    border-radius: 8px;
}
a.nav-page:hover {
    color: var(--navy);
    background: var(--light-grey);
}
.nav-path-segment {
    font-family: 'Idiqlat', serif;
    font-size: 15px;
    color: var(--dark-grey);
    text-decoration: none;
    text-transform: lowercase;
    transition: color 0.15s;
}
.nav-path-segment:hover {
    color: var(--navy);
    text-decoration: underline;
}
.nav-path-current {
    font-family: 'Idiqlat', serif;
    font-size: 15px;
    color: var(--navy);
    text-transform: lowercase;
}
.nav-logout {
    font-size: 12px;
    font-weight: 500;
    color: var(--slate);
    text-decoration: none;
}
.nav-logout:hover {
    color: var(--navy);
}
.nav-pill {
    display: flex;
    align-items: center;
    margin-left: 14px;
    background: var(--light-grey);
    border-radius: 20px;
    overflow: hidden;
}
.nav-pill-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--navy);
    padding: 6px 12px 6px 14px;
    white-space: nowrap;
}
.nav-pill a {
    font-size: 12px;
    font-weight: 500;
    color: var(--slate);
    text-decoration: none;
    padding: 6px 14px 6px 10px;
    border-left: 1px solid #E5E7EB;
    transition: all 0.15s;
    white-space: nowrap;
}
.nav-pill a:hover {
    color: var(--coral);
    background: #FEE2E2;
}
.nav-login a {
    font-size: 13px;
    font-weight: 500;
    color: var(--white);
    background: var(--navy);
    text-decoration: none;
    padding: 6px 16px;
    border-radius: 20px;
    margin-left: 14px;
    transition: background 0.15s;
}
.nav-login a:hover {
    background: #1a252f;
}

/* ── BUTTONS ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
}
.btn-primary {
    background: var(--navy);
    color: var(--white);
}
.btn-primary:hover {
    background: #1a252f;
}
.btn-teal {
    background: var(--teal);
    color: var(--white);
}
.btn-teal:hover {
    background: var(--teal-dark);
}
.btn-outline {
    background: transparent;
    color: var(--navy);
    border: 1.5px solid var(--navy);
}
.btn-outline:hover {
    background: var(--navy);
    color: var(--white);
}
.btn-sm {
    font-size: 12px;
    padding: 6px 16px;
    border-radius: 6px;
}

/* ── PAGE HEADER (logo + URL) ── */
.page-header {
    text-align: center;
    padding: 0 32px;
}
.page-header-logo {
    width: 320px;
    height: auto;
    margin-bottom: 8px;
}
.page-header-username {
    display: block;
    font-family: 'Idiqlat', serif;
    font-size: 16px;
    color: var(--slate);
    margin-bottom: 2px;
    text-decoration: none;
    transition: color 0.15s;
}
.page-header-username:hover {
    color: var(--navy);
    text-decoration: underline;
}
.page-header-url {
    font-family: 'Idiqlat', serif;
    font-size: 18px;
    color: var(--slate);
    letter-spacing: 0.2px;
}
.page-header-url a {
    color: var(--dark-grey);
    text-decoration: none;
    transition: color 0.15s;
}
.page-header-url a:hover {
    color: var(--navy);
    text-decoration: underline;
}
.page-header-sep {
    margin: 0 4px;
    color: var(--slate);
}
.page-header-url a.page-header-current {
    color: var(--navy);
}

/* ── REPORT HEADER (title + download button) ── */
.report-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
}
.report-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.5px;
}
.report-header p {
    font-size: 14px;
    color: var(--slate);
    margin-top: 4px;
}
.report-download-btn {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 20px;
    border-radius: 8px;
    border: 1.5px solid var(--navy);
    background: var(--navy);
    color: var(--white);
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    text-decoration: none;
}
.report-download-btn:hover { background: #1a252f; }
@media (max-width: 768px) {
    .report-header { flex-direction: column; gap: 12px; }
}

/* ── MAIN CONTENT ── */
.main-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 28px 32px 80px;
    width: 100%;
    flex: 1;
}

/* ── FOOTER ── */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 4px 24px;
    font-size: 11px;
    color: var(--slate);
    background: var(--white);
    z-index: 10000;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.site-footer::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 10px;
    right: 10px;
    height: 2px;
    background: #000;
    z-index: 10002;
}


/* ── CARDS ── */
.card {
    background: var(--white);
    border-radius: 12px;
    padding: 28px 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.card + .card {
    margin-top: 20px;
}

/* ── FLASH MESSAGES ── */
.flash-messages {
    max-width: 960px;
    margin: 16px auto 0;
    padding: 0 32px;
}
.flash {
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}
.flash-error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}
.flash-success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}
.flash-info {
    background: #DBEAFE;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

/* ── FORMS ── */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}
.form-group input {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    padding: 10px 14px;
    border: 1.5px solid var(--light-grey);
    border-radius: 8px;
    background: var(--white);
    color: var(--navy);
    outline: none;
    transition: border-color 0.15s;
}
.form-group input:focus {
    border-color: var(--teal);
}
.form-hint {
    font-size: 11px;
    color: var(--slate);
    margin-top: 4px;
}

/* ── LANDING PAGE ── */
.hero {
    text-align: center;
    padding: 80px 32px 60px;
}
.hero h1 {
    font-size: 42px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -1px;
    margin-bottom: 16px;
    line-height: 1.2;
}
.hero h1 span {
    color: var(--teal);
}
.hero p {
    font-size: 17px;
    color: var(--dark-grey);
    max-width: 540px;
    margin: 0 auto 32px;
    line-height: 1.65;
}
.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}
.feature-card {
    background: var(--white);
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    text-align: center;
}
.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 22px;
}
.feature-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 8px;
}
.feature-card p {
    font-size: 13px;
    color: var(--dark-grey);
    line-height: 1.6;
}

/* ── LOGIN / REGISTER ── */
.auth-container {
    max-width: 400px;
    margin: 60px auto;
    padding: 0 32px;
}
.auth-card {
    background: var(--white);
    border-radius: 12px;
    padding: 36px 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.auth-card h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}
.auth-card .subtitle {
    font-size: 13px;
    color: var(--slate);
    margin-bottom: 28px;
}

/* ── PORTAL DASHBOARD ── */
.portal-header {
    margin-bottom: 32px;
}
.portal-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}
.portal-header p {
    font-size: 14px;
    color: var(--slate);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.tool-card {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: box-shadow 0.15s, transform 0.15s;
    text-decoration: none;
    color: inherit;
    display: block;
}
.tool-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.tool-card.disabled {
    opacity: 0.55;
    pointer-events: none;
}
.tool-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 14px;
}
.tool-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 6px;
}
.tool-card p {
    font-size: 13px;
    color: var(--dark-grey);
    line-height: 1.5;
}
.tool-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-top: 12px;
}
.badge-active {
    background: #D1FAE5;
    color: #065F46;
}
.badge-soon {
    background: var(--light-grey);
    color: var(--slate);
}

/* ── TEAM PAGE ── */
.team-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.team-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--slate);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 10px 12px;
    border-bottom: 2px solid var(--light-grey);
}
.team-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--light-grey);
    vertical-align: middle;
}
.team-table tr:last-child td {
    border-bottom: none;
}
.team-table .user-name {
    font-weight: 600;
    color: var(--navy);
}
.team-table .user-email {
    color: var(--slate);
}
.role-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    letter-spacing: 0.2px;
}
.role-badge-admin {
    background: #D1FAE5;
    color: #065F46;
}
.role-badge-staff {
    background: var(--light-grey);
    color: var(--slate);
}
.team-actions {
    display: flex;
    gap: 8px;
}
.btn-danger {
    background: transparent;
    color: var(--coral);
    border: 1.5px solid var(--coral);
}
.btn-danger:hover {
    background: var(--coral);
    color: var(--white);
}
.invite-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}
.invite-form .form-group {
    flex: 1;
    margin-bottom: 0;
}
.flash-success {
    word-break: break-all;
}

/* ── FRONT PAGE SECTIONS ── */
.fp-section {
    padding: 80px 32px;
}
.fp-alt {
    background: var(--white);
}
.fp-inner {
    max-width: 960px;
    margin: 0 auto;
}

/* Hero */
.fp-hero {
    text-align: center;
    padding: 100px 32px 80px;
}
.fp-hero h1 {
    font-size: 48px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -1.5px;
    line-height: 1.15;
    margin-bottom: 20px;
}
.fp-hero h1 span {
    color: var(--teal);
}
.fp-hero-sub {
    font-size: 18px;
    color: var(--dark-grey);
    max-width: 560px;
    margin: 0 auto 36px;
    line-height: 1.65;
}
.fp-hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* Content placeholders */
.fp-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}
.fp-section-sub {
    font-size: 15px;
    color: var(--dark-grey);
    margin-bottom: 32px;
}
.fp-placeholder-body {
    font-size: 15px;
    color: var(--slate);
    max-width: 640px;
    line-height: 1.7;
}

/* Case study note */
.case-study-note {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--warm-bg);
    border: 1px solid #E8DFD4;
    border-left: 4px solid var(--teal);
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 28px;
}
.case-study-note-icon {
    flex-shrink: 0;
    color: var(--teal);
    margin-top: 2px;
}
.case-study-note-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
}
.case-study-note p {
    font-size: 13px;
    color: var(--dark-grey);
    line-height: 1.7;
    margin: 0;
}
.case-study-note strong {
    color: var(--navy);
}

/* Report grid */
.fp-report-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* Footer CTA */
.fp-cta {
    text-align: center;
    background: var(--navy);
    color: var(--white);
}
.fp-cta h2 {
    color: var(--white);
}
.fp-cta .fp-placeholder-body {
    color: rgba(255,255,255,0.7);
    margin: 0 auto 32px;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .hero h1 { font-size: 30px; }
    .hero p { font-size: 15px; }
    .features { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; align-items: center; }
    body::before { border-width: 6px; }
    body::after { top: 0; left: 4px; right: 4px; height: 100lvh; }
    .site-nav::after { left: 4px; right: 4px; }
    .site-footer::before { left: 4px; right: 4px; }
    body { padding-top: 36px; padding-bottom: 28px; }
    .site-nav { height: 36px; }
    .site-footer { height: 28px; }
    .nav-inner { padding: 0 16px; flex-wrap: wrap; gap: 8px; }
    .nav-left { flex-wrap: wrap; }
    .nav-pill { margin-left: 0; }
    .main-content { padding: 20px 16px 60px; }
    .fp-section { padding: 48px 16px; }
    .fp-hero { padding: 60px 16px 48px; }
    .fp-hero h1 { font-size: 32px; }
    .fp-hero-sub { font-size: 16px; }
    .fp-hero-actions { flex-direction: column; align-items: center; }
    .fp-report-grid { grid-template-columns: 1fr; }
}
