/*
 * m-cb-style.css – all styles of crossbell.net / .org / .eu.
 *
 * 1. Settings (fonts, colours, sizes, effects)
 * 2. Base and text (page, links, focus, headings, lists, tables)
 * 3. Top bar
 * 4. Sale page (domain, note, form)
 * 5. Pages with a box (privacy)
 * 6. Buttons and form
 * 7. Footer
 * 8. Phones
 *
 * Colour rules (CLAUDE.md "Colour proportion"): button one step lighter
 * than the link, white text at least 4.5:1, on mouse-over the link blue;
 * links: dotted line at rest, solid line and more saturated blue on
 * mouse-over (same thickness); gold only for large text and lines
 * (4.47:1 on white), title lines 7 % lighter.
 */


/* 1. Settings ---------------------------------------------------------------- */

/* Text font: Atkinson Hyperlegible Next (own server, licence in
   assets/fonts/), Regular and Bold, basic and extended Latin. */
@font-face {
    font-family: 'Atkinson Hyperlegible Next';
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/atkinson-next-latin-400.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Atkinson Hyperlegible Next';
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/atkinson-next-latin-ext-400.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Atkinson Hyperlegible Next';
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/atkinson-next-latin-700.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Atkinson Hyperlegible Next';
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/atkinson-next-latin-ext-700.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    /* colours */
    --clr-black: #3a3532;          /* smoky quartz = our black: text, headings */
    --clr-text-soft: #5c5651;      /* note (VAT), footer, form hints – 7.2:1 */
    --clr-grey: #c6c0bb;           /* lines, borders */
    --clr-grey-light: #efece9;     /* box, inputs */
    --clr-off-white: #faf8f6;      /* form card */
    --clr-white: #ffffff;
    --clr-gold: #947225;           /* logo gold: the domain, bullets – large text only (4.47:1) */
    --clr-gold-line: #b1882c;      /* lines under titles: gold 7 % lighter (3.3:1) */
    --clr-link: #1674aa;           /* links – 5.1:1 */
    --clr-link-hover: #0a66ad;     /* links on mouse-over / focus: more saturated – 6.0:1 */
    --clr-link-line: #209ddb;      /* dotted line under links (as msvoboda.at) */
    --clr-button: #1d7cb5;         /* button (large area, one step lighter) – 4.6:1 with white */
    --clr-button-hover: #1674aa;   /* button on mouse-over / focus = link blue */
    --clr-button-text: #ffffff;
    --clr-focus: #1674aa;          /* keyboard focus ring */
    --clr-error: #b42318;          /* form errors */
    --clr-shadow: rgba(58, 53, 50, 0.18);

    /* fonts */
    --font-text: 'Atkinson Hyperlegible Next', Arial, sans-serif;

    /* sizes */
    --ft-body: clamp(1.05rem, 1vw + 0.5rem, 1.15rem);
    --ft-domain: clamp(2.4rem, 9vw, 4.2rem);
    --ft-h1: clamp(1.8rem, 4.5vw, 2.4rem);
    --ft-h2: clamp(1.25rem, 3vw, 1.4rem);
    --max-w: 1000px;
    --text-max: 42rem;
    --gutter: 20px;
    --gap: 1.5em;
    --radius: 3px;

    /* effects: content appears once (slide-up, fade or none); speed of
       links and buttons */
    --effect: slide-up;
    --effect-time: 0.4s;
    --hover-time: 0.15s;
    --button-rise: -1px;
}

/* "Reduce motion" set on the device: no movement (colours still change). */
@media (prefers-reduced-motion: reduce) {
    :root {
        --effect: none;
        --hover-time: 0s;
        --button-rise: 0;
    }
}


/* 2. Base and text ------------------------------------------------------------- */

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

/* The footer always sits at the bottom of the window. */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background: var(--clr-white);
    color: var(--clr-black);
    font-family: var(--font-text);
    font-size: var(--ft-body);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

main.container {
    flex: 1 0 auto;
    padding-bottom: calc(var(--gap) * 2);
    animation: var(--effect) var(--effect-time) ease-out;
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

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

.page {
    max-width: var(--text-max);
}

/* Links: always underlined; on mouse-over / focus more saturated and a
   thicker line. */
/* Links (as on msvoboda.at): a dotted line in a lighter blue; on
   mouse-over / focus a solid line, text and line in the more saturated
   blue. The line always shows that it is a link (not colour alone). */
a {
    color: var(--clr-link);
    text-decoration: underline dotted 2px var(--clr-link-line);
    text-underline-offset: 0.22em;
    transition: color var(--hover-time), text-decoration-color var(--hover-time);
}

a:hover,
a:focus-visible {
    color: var(--clr-link-hover);
    text-decoration: underline solid 2px var(--clr-link-hover);
}

.text-link {
    font-weight: 400;
}

/* Keyboard focus: a clear ring with a small gap. */
a:focus-visible,
button:focus-visible,
select:focus-visible {
    outline: 2px solid var(--clr-focus);
    outline-offset: 3px;
}

h1,
h2 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    margin: 2rem 0 1rem 0;
    font-size: var(--ft-h1);
}

.text-h2 {
    margin: 2rem 0 0.6rem 0;
    padding-bottom: 0.35em;
    border-bottom: 3px solid var(--clr-gold-line);
    font-size: var(--ft-h2);
}

.text-h3 {
    margin: 1.4rem 0 0.4rem 0;
    font-size: 1.1em;
}

p {
    margin: 0 0 1rem 0;
}

/* Lists from the markup (--item--): small round bullets in gold. */
.text-list {
    list-style: none;
    margin: 0.7rem 0 1rem 0;
    padding-left: 1.5rem;
}

.text-list li {
    position: relative;
    padding-bottom: 0.3rem;
    line-height: 1.5;
}

.text-list li::before {
    content: "";
    position: absolute;
    top: 0.575em;
    left: calc(-1.2rem - 2px);
    width: 0.35em;
    height: 0.35em;
    background: var(--clr-gold);
    border-radius: 50%;
}

/* Tables from the markup (price list). */
.text-table {
    overflow-x: auto;
    margin: 1.2rem 0;
}

.text-table table {
    width: 100%;
    border-collapse: collapse;
}

.text-table td,
.text-table th {
    padding: 0.7rem 0.6rem;
    border-bottom: 1px solid var(--clr-grey);
    text-align: left;
    vertical-align: top;
}

.text-table td:last-child {
    text-align: right;
    white-space: nowrap;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* "Skip to content": hidden above the window, visible on focus. */
.skip-link {
    position: absolute;
    top: -3rem;
    left: 1rem;
    z-index: 20;
    padding: 0.5rem 1rem;
    background: var(--clr-white);
    color: var(--clr-black);
}

.skip-link:focus {
    top: 0.5rem;
}


/* 3. Top bar -------------------------------------------------------------------- */

.topbar {
    border-bottom: 1px solid var(--clr-grey-light);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 3.4rem;
}

/* The domain top left: a normal link (no menu on these pages). */
.brand {
    font-weight: 400;
}

.language {
    display: inline-block;
    padding: 0.5rem 0;
}


/* 4. Sale page --------------------------------------------------------------------- */

.status {
    max-width: var(--text-max);
}

/* The domain: large, in the logo gold (large text: 3:1 is enough, gold
   has 4.47:1). */
.domain {
    margin: 3rem 0 0.3rem 0;
    color: var(--clr-gold);
    font-size: var(--ft-domain);
    letter-spacing: -0.01em;
    overflow-wrap: anywhere;
}

.status-title {
    margin-bottom: 1.6rem;
    padding-bottom: 0.8rem;
    border-bottom: 3px solid var(--clr-gold-line);
    font-size: var(--ft-h2);
    font-weight: 700;
}

/* VAT note: small, in the soft grey (7.2:1 – still AA when small). */
.note {
    color: var(--clr-text-soft);
    font-size: 0.85rem;
}

.form-card {
    margin-top: 2.5rem;
    padding: 1.2rem 1.4rem 1.4rem 1.4rem;
    background: var(--clr-off-white);
    border: 1px solid var(--clr-grey-light);
    border-radius: var(--radius);
}

.form-title {
    margin: 0.3rem 0 1.2rem 0;
    font-size: var(--ft-h2);
}


/* 5. Pages with a box (title and text 2/3, box 1/3 on the right) ------------- */

.split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-areas:
        "title box"
        "text  box";
    column-gap: calc(var(--gap) * 2);
    align-items: start;
}

.split-title {
    grid-area: title;
}

.split .box {
    grid-area: box;
}

.split-text {
    grid-area: text;
}

.box {
    margin-top: 2rem;
    padding: 0.2rem 1.4rem 1rem 1.4rem;
    background: var(--clr-grey-light);
    border-radius: var(--radius);
}

.box .text-h2 {
    margin-top: 1rem;
    font-size: 1.1em;
}

.box .text-h2 + .text-list {
    margin-top: 0.8rem;
}

/* Box: a bold lead line under the heading, its list close below it. */
.box .text-h2 + p {
    margin: 0.8rem 0 0.4rem 0;
}

.box .text-h2 + p + .text-list {
    margin-top: 0.4rem;
}

.box p,
.box .text-list li {
    font-size: 0.95em;
    line-height: 1.4;
}

.box .text-list li::before {
    top: 0.525em;
}


/* 6. Buttons and form (shared contact form) ------------------------------------------ */

/* Button: lighter blue, white text; on mouse-over / focus the link blue,
   a 1 px rise and a soft shadow (no rise with "reduce motion"). */
.btn-submit,
.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.6rem 1.4rem;
    background: var(--clr-button);
    border: 0;
    border-radius: var(--radius);
    color: var(--clr-button-text);
    font-family: inherit;
    font-size: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--hover-time), transform var(--hover-time), box-shadow var(--hover-time);
}

.btn-submit:hover,
.btn-submit:focus-visible,
.text-button:hover,
.text-button:focus-visible {
    background: var(--clr-button-hover);
    color: var(--clr-button-text);
    text-decoration: none;
    transform: translateY(var(--button-rise));
    box-shadow: 0 3px 8px var(--clr-shadow);
}

.btn-submit:active,
.text-button:active {
    transform: none;
    box-shadow: none;
}

/* While the browser solves the spam puzzle (about a second). */
.btn-submit:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

.form-group {
    margin-bottom: 1.1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 700;
}

.form-control {
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: var(--clr-white);
    border: 1px solid var(--clr-grey);
    border-radius: var(--radius);
    color: var(--clr-black);
    font-family: inherit;
    font-size: inherit;
}

.form-control:focus {
    outline: 2px solid var(--clr-focus);
    outline-offset: 1px;
    border-color: var(--clr-focus);
}

textarea.form-control {
    resize: vertical;
}

.form-control[aria-invalid="true"] {
    border-color: var(--clr-error);
}

.form-error {
    margin: 0.3rem 0 0 0;
    color: var(--clr-error);
    font-size: 0.9rem;
    font-weight: 700;
}

.form-counter,
.form-note {
    color: var(--clr-text-soft);
    font-size: 0.85rem;
}

.form-counter {
    margin: 0.2rem 0 0 0;
    text-align: right;
}

.form-alert,
.form-success {
    margin: 0 0 1.2rem 0;
    padding: 0.9rem 1.2rem;
    background: var(--clr-white);
    border-left: 4px solid var(--clr-error);
}

.form-alert p {
    margin: 0;
    color: var(--clr-error);
    font-weight: 700;
}

/* Thank-you message: no own background, the form card shows through. */
.form-success {
    background: transparent;
    border-left-color: var(--clr-gold);
}

.form-success h2 {
    margin-top: 0;
}

/* Trap field for bots: off screen (not display:none – some bots skip it). */
.form-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}


/* 7. Footer --------------------------------------------------------------------------- */

.footer {
    padding: 1.2rem 0;
    border-top: 1px solid var(--clr-grey-light);
    color: var(--clr-text-soft);
    font-size: 0.9rem;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
}

.footer-copy {
    margin: 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links a {
    display: inline-block;
    padding: 0.3rem 0;
}


/* 8. Phones (up to 768px) ---------------------------------------------------------- */

@media (max-width: 768px) {
    .split {
        grid-template-columns: 1fr;
        grid-template-areas:
            "title"
            "box"
            "text";
    }

    .split .box {
        margin-top: 0;
        margin-bottom: 0.5rem;
    }

    .domain {
        margin-top: 2rem;
    }

    .form-card {
        padding: 1rem;
    }
}
