@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=Source+Sans+3:wght@400;500;600&display=swap');

:root {
    --bg: #f3f4ef;
    --surface: #ffffff;
    --surface-soft: #f7f8f3;
    --text: #1b1e1b;
    --text-muted: #4a514a;
    --line: #d8ddd3;
    --accent: #1f6b4f;
    --accent-strong: #154c38;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 8px 20px rgba(16, 24, 16, 0.06);
    --shadow-md: 0 14px 34px rgba(16, 24, 16, 0.1);
    --container: 1120px;
    --font-scale: 1;
}

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

html {
    scroll-behavior: smooth;
    font-size: calc(16px * var(--font-scale));
}

body {
    background:
        radial-gradient(circle at 20% 0%, rgba(31, 107, 79, 0.08), transparent 30%),
        radial-gradient(circle at 100% 30%, rgba(38, 45, 39, 0.05), transparent 35%),
        var(--bg);
    color: var(--text);
    font-family: 'Source Sans 3', 'Trebuchet MS', sans-serif;
    line-height: 1.6;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.narrow {
    max-width: 900px;
}

h1,
h2,
h3 {
    color: var(--text);
    font-family: 'Sora', 'Franklin Gothic Medium', sans-serif;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

h1 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(1.5rem, 2.4vw, 2.1rem);
    margin-bottom: 0.9rem;
}

h3 {
    font-size: 1.22rem;
    margin-bottom: 0.75rem;
}

p {
    color: var(--text-muted);
}

a {
    color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: 0.5rem;
    z-index: 300;
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    background-color: var(--accent-strong);
    color: #ffffff;
    transform: translateY(-160%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(216, 221, 211, 0.8);
    backdrop-filter: blur(8px);
    background-color: rgba(243, 244, 239, 0.88);
}

.site-header .container {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    position: relative;
}

.logo {
    text-decoration: none;
    font-family: 'Sora', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
}

.logo-rig {
    color: var(--text);
}

.logo-smiths {
    color: var(--accent);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.98rem;
    border-radius: 999px;
    padding: 0.5rem 0.85rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(31, 107, 79, 0.12);
    color: var(--accent-strong);
}

.hero {
    padding: clamp(4.5rem, 8vw, 7rem) 0 3.4rem;
}

.hero .container {
    max-width: 860px;
    text-align: center;
}

.hero-sub {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    margin: 0 auto;
}

.hero-actions {
    display: flex;
    gap: 0.85rem;
    justify-content: center;
    margin-top: 1.8rem;
    flex-wrap: wrap;
}

.section {
    padding: 1.2rem 0 2.2rem;
}

.section-head {
    margin-bottom: 1.25rem;
}

.page-content {
    min-height: 68vh;
    padding-top: 2.3rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    font-size: 0.77rem;
    color: var(--accent);
    margin-bottom: 0.7rem;
}

.section-intro {
    max-width: 760px;
    font-size: 1.15rem;
    margin-bottom: 1.3rem;
}

.grid {
    display: grid;
    gap: 1rem;
}

.grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stack {
    display: grid;
    gap: 1rem;
}

.card {
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: clamp(1.2rem, 2vw, 1.8rem);
    animation: rise-in 0.35s ease both;
}

.project-preview {
    background: linear-gradient(155deg, var(--surface) 55%, var(--surface-soft));
}

.project-preview h3 {
    margin-bottom: 0.55rem;
}

.project-preview-logo {
    width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--line);
    margin-bottom: 0.55rem;
    display: block;
}

.project-card {
    display: grid;
    gap: 0.95rem;
}

.project-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.project-logo {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--line);
    flex: 0 0 auto;
}

.project-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
}

.project-summary {
    color: var(--text);
    font-weight: 600;
}

.status-badge {
    display: inline-block;
    white-space: nowrap;
    border-radius: 999px;
    padding: 0.35rem 0.72rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-strong);
    background-color: rgba(31, 107, 79, 0.12);
    border: 1px solid rgba(31, 107, 79, 0.22);
}

.feature-list {
    list-style: none;
    display: grid;
    gap: 0.6rem;
    margin: 0.1rem 0;
}

.feature-list li {
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.75rem;
    background-color: var(--surface-soft);
    border: 1px solid var(--line);
}

.project-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.meta-chip {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.4rem 0.7rem;
    font-size: 0.86rem;
    color: var(--text-muted);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent);
    border-radius: 999px;
    background-color: var(--accent);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    padding: 0.68rem 1.2rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.button:hover {
    background-color: var(--accent-strong);
    border-color: var(--accent-strong);
    transform: translateY(-1px);
}

.button-secondary {
    background-color: transparent;
    color: var(--accent-strong);
}

.button-secondary:hover {
    background-color: rgba(31, 107, 79, 0.1);
}

.a11y-controls {
    position: relative;
}

.a11y-toggle {
    min-width: 128px;
}

.a11y-panel {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    width: min(300px, calc(100vw - 2rem));
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 0.8rem 0.9rem;
    display: grid;
    gap: 0.6rem;
}

.a11y-panel[hidden] {
    display: none;
}

.a11y-title {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.a11y-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.a11y-option input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
}

.text-link {
    color: var(--accent-strong);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 2px;
}

.prose p + p {
    margin-top: 0.75rem;
}

.detail-list {
    list-style: none;
    display: grid;
    gap: 0.5rem;
}

.inline-app-logo {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
    margin-right: 0.45rem;
    vertical-align: middle;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 1rem;
}

.contact-card h2 {
    font-size: 1.02rem;
    margin-bottom: 0.25rem;
    margin-top: 1rem;
}

.contact-card h2:first-child {
    margin-top: 0;
}

.contact-form {
    display: grid;
    gap: 0.85rem;
}

.form-group {
    display: grid;
    gap: 0.34rem;
}

label {
    font-size: 0.93rem;
    color: var(--text);
    font-weight: 600;
}

input,
textarea {
    width: 100%;
    padding: 0.68rem 0.76rem;
    border: 1px solid #c6cec1;
    border-radius: var(--radius-sm);
    font: inherit;
    background-color: #ffffff;
    color: var(--text);
}

input:focus,
textarea:focus {
    outline: 2px solid rgba(31, 107, 79, 0.3);
    outline-offset: 1px;
    border-color: var(--accent);
}

.form-note {
    font-size: 0.9rem;
}

.site-footer {
    border-top: 1px solid var(--line);
    margin-top: 2.3rem;
    background-color: rgba(255, 255, 255, 0.65);
}

.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 250;
    background-color: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
}

.cookie-banner p {
    color: var(--text);
    font-size: 0.95rem;
}

.cookie-banner a {
    color: var(--accent-strong);
    font-weight: 600;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.4rem 0;
}

.footer-info {
    display: grid;
    gap: 0.2rem;
}

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

.footer-links a {
    color: var(--accent-strong);
    text-decoration: none;
    font-weight: 600;
}

.footer-links a:hover {
    text-decoration: underline;
}

body.a11y-large-text {
    --font-scale: 1.12;
}

body.a11y-high-contrast {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-soft: #f4f4f4;
    --text: #111111;
    --text-muted: #222222;
    --line: #727272;
    --accent: #005c3f;
    --accent-strong: #003f2c;
    background: var(--bg);
}

body.a11y-high-contrast .site-header {
    background-color: #ffffff;
    border-bottom-color: var(--line);
}

body.a11y-high-contrast .button-secondary {
    color: var(--accent-strong);
    border-color: var(--accent-strong);
}

body.a11y-high-contrast .text-link,
body.a11y-high-contrast .footer-links a {
    color: #003f2c;
}

body.a11y-reduce-motion,
body.a11y-reduce-motion * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 920px) {
    .contact-layout,
    .grid.cols-2 {
        grid-template-columns: 1fr;
    }

    .main-nav ul {
        justify-content: center;
    }

    .site-header .container {
        row-gap: 0.8rem;
    }
}

@media (max-width: 640px) {
    .site-header {
        position: static;
    }

    .site-header .container {
        flex-direction: column;
        justify-content: center;
        padding-top: 0.9rem;
        padding-bottom: 0.9rem;
    }

    .a11y-controls {
        width: 100%;
    }

    .a11y-toggle {
        width: 100%;
    }

    .a11y-panel {
        left: 0;
        right: 0;
        width: 100%;
    }

    .hero {
        padding-top: 2.8rem;
    }

    .project-head {
        flex-direction: column;
    }

    .project-logo {
        width: 44px;
        height: 44px;
    }

    .project-preview-logo {
        width: 56px;
        height: 56px;
    }

    .footer-content {
        flex-direction: column;
    }

    .cookie-banner {
        flex-direction: column;
        align-items: flex-start;
    }
}
