:root {
    --bg: #f4f1ea;
    --surface: #fbfaf7;
    --surface-strong: #f0ebe2;
    --line: #d8d0c4;
    --text: #1f1f1c;
    --muted: #5c5a55;
    --accent: #2f4f4f;
    --accent-soft: #e3ebea;
    --success: #2d6a4f;
    --error: #b23a48;
    --shadow: 0 12px 32px rgba(31, 31, 28, 0.08);
    --radius: 8px;
    --transition: 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "IBM Plex Sans", "Segoe UI", Tahoma, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea {
    font: inherit;
}

.container {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(244, 241, 234, 0.94);
    border-bottom: 1px solid rgba(216, 208, 196, 0.9);
    backdrop-filter: blur(10px);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    border: 1px solid var(--line);
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-text strong {
    font-size: 1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.brand-text span {
    color: var(--muted);
    font-size: 0.84rem;
}

.site-nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 24px;
}

.nav-links a {
    color: var(--muted);
    font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--text);
}

.hamburger {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 6px;
    cursor: pointer;
}

.bar {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--text);
    transition: var(--transition);
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

main section {
    padding: 72px 0;
}

.hero-section {
    padding: 64px 0;
}

.hero-grid {
    max-width: 920px;
}

.eyebrow {
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1,
.section-heading h2 {
    font-family: "Source Serif 4", Georgia, serif;
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.hero-copy h1 {
    max-width: 15ch;
    font-size: clamp(2.6rem, 5vw, 4.6rem);
    margin-bottom: 20px;
}

.hero-lead {
    max-width: 64ch;
    color: var(--muted);
    font-size: 1.05rem;
}

.hero-actions {
    display: flex;
    gap: 14px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.app-card,
.contact-form {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.app-content p {
    color: var(--muted);
}

.section-shell {
    display: grid;
    gap: 28px;
}

.section-heading {
    display: grid;
    gap: 10px;
    max-width: 760px;
}

.section-heading h2 {
    font-size: clamp(2rem, 3vw, 3rem);
}

.contact-container {
    max-width: 760px;
}

.apps-section {
    background: linear-gradient(to bottom, transparent, rgba(47, 79, 79, 0.03));
}

.apps-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.app-card {
    padding: 22px;
}

.app-image {
    margin-bottom: 18px;
}

.app-logo {
    width: 88px;
    height: 88px;
    border-radius: 20px;
    border: 1px solid var(--line);
}

.app-content {
    display: grid;
    gap: 12px;
}

.app-content h3 {
    font-size: 1.1rem;
}

.store-link {
    color: var(--accent);
}

.store-link:hover,
.store-link:focus-visible {
    text-decoration: underline;
}

.apps-footer-link {
    margin-top: 24px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.84rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.contact-form {
    padding: 24px;
}

.form-group + .form-group {
    margin-top: 16px;
}

.form-control {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    padding: 12px 14px;
    color: var(--text);
}

.form-control:focus-visible,
.btn:focus-visible,
.hamburger:focus-visible,
.back-to-top:focus-visible,
.nav-links a:focus-visible,
.store-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

textarea.form-control {
    min-height: 140px;
    resize: vertical;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent);
    color: #f9faf8;
}

.btn-primary:hover {
    background: #284444;
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--line);
}

.btn-secondary:hover {
    background: var(--surface-strong);
}

.form-btn {
    width: 100%;
    margin-top: 18px;
}

.form-message {
    margin-top: 14px;
    min-height: 24px;
    font-size: 0.95rem;
}

.form-message.success {
    color: var(--success);
}

.form-message.error {
    color: var(--error);
}

.site-footer {
    padding: 28px 0 48px;
    border-top: 1px solid var(--line);
}

.footer-container {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.95rem;
}

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 900px) {
    .hamburger {
        display: inline-block;
    }

    .nav-links {
        position: fixed;
        top: 76px;
        right: 16px;
        left: 16px;
        display: none;
        flex-direction: column;
        gap: 12px;
        padding: 18px;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
    }

    .nav-links.active {
        display: flex;
    }

    .apps-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    main section {
        padding: 56px 0;
    }

    .header-container {
        min-height: 68px;
    }

    .brand-text span {
        display: none;
    }

    .hero-copy h1 {
        max-width: none;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
