*, *::after, *::before {
    box-sizing: border-box;
}

a:link, a:visited { color: #bd8299; text-decoration: underline; text-underline-offset: 3px; }
a:hover, a:active { color: #D7C7A8; }

::-moz-selection {
  color: white;
  background: #bd829977;
}

::selection {
  color: white;
  background: #bd829977;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(1200px 600px at 70% -10%, rgba(46,107,95,0.3), transparent 60%),
              radial-gradient(900px 500px at 10% 0%, rgba(181, 138, 59, 0.2), transparent 55%),
              #0D0E10;
}

body {
    color: #F2EEE7;
    font-family: "Roboto", sans-serif;
    font-size: 0.95em;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

pre {
    color: #F2EEE7;
    font-family: "Roboto", sans-serif;
    font-size: 0.95em;
    line-height: 1.6;
}

p {
    margin-block: 1rem;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Playfair Display", serif;
    margin-block-start: 2rem;
}

.sale {
    font-weight: 700;
    color: red;
}

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

.container {
    max-width: 1100px;
    margin-inline: auto;
}

header {
    margin-block: 1.5rem 0.1rem;
    display: flex;
    padding-block: 2rem;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-title, .header-title a {
    font-family: "Stardos Stencil", cursive;
    font-weight: 700;
    font-size: 3rem;
    color: #D7C7A8;
    display: block;
    margin-inline-end: auto;
    text-decoration: none;
}

.image-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(0.75rem, 2vw, 1.5rem);
}

.image-row img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0.5rem;
}

.site-nav {
    display: flex;
    gap: 2rem;
    margin-inline-start: auto;
}

.site-nav a {
    color: #C9C2B8;
    text-decoration: none;
    position: relative;
    letter-spacing: .06em;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 2px;
    background: #D7C7A8;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .25s ease;
}

.site-nav a:hover {
    color: #F2EEE7;
}

.site-nav a:hover::after {
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
    appearance: none;
    border: 1px solid rgba(215,199,168,0.18);
    background: rgb(255 255 255 / 0.04);
    color: #D7C7A8;
    font: inherit;
    font-weight: 500;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    margin-inline-start: auto;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

.nav-toggle:hover {
    background: rgb(255 255 255 / 0.08);
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

.main {
    background-color: rgb(255 255 255 / 0.05);
    border-radius: 1.5rem 0.25rem 1.5rem 0.25rem;
    padding: 2rem;
    display: flow-root;
}

.decoration {
    max-width: 260px;
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0.5rem;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    margin-bottom: 1rem;
}

.img-right {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.img-left {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.text-center {
    text-align: center;
}

.signature {
    font-family: "Ms Madi", cursive;
    font-weight: 400;
    font-size: 2.5rem;
    color: #D7C7A8;
    margin-top: 2rem;
}

footer {
    margin-inline: auto;
    text-align: center;
    margin-block: 1rem;
    font-size: 0.8rem;
    color: #919191;
}

.accordion {
    padding: 1.5rem;
}

/* Hevoslistaus */
.horse-group {
    overflow: hidden;
    background: rgb(255 255 255 / 0.025);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 0.9rem;
    margin-bottom: 1rem;
}

.horse-group summary {
    list-style: none;
    cursor: pointer;
    padding: 1rem 1.25rem 1rem 2.5rem;
    color: #D7C7A8;
    font-family: "Stardos Stencil", cursive;
    font-size: 1.35rem;
    font-weight: 400;
    position: relative;
    user-select: none;
    transition: background .25s ease, color .25s ease;
}

.horse-group summary:hover,
.horse-group[open] summary {
    background: rgb(255 255 255 / 0.04);
    color: #F2EEE7;
}

.horse-group summary::-webkit-details-marker {
    display: none;
    margin-block: auto;
}

.horse-group summary::before {
    content: "▸";
    position: absolute;
    left: 1rem;
    color: #D7C7A8;
    top: 50%;
    transform: translateY(-50%);
    transition: transform .25s ease;

    color: #D7C7A8;
    font-size: 1rem;
}

.horse-group[open] summary::before {
    transform: translateY(-50%) rotate(90deg);
}

.horse-grid {
    padding: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
    align-items: stretch;
    overflow: hidden;
}

.horse-card {
    max-width: 260px;
    width: 100%;
    min-height: 320px;
    height: 100%;
    margin-inline: auto;
    background:
        radial-gradient(circle at bottom left, rgba(184, 119, 146, .14), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015));
    box-shadow: 0 18px 45px rgba(0,0,0,.28);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 0.85rem;
    overflow: hidden;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.horse-card:hover {
    transform: translateY(-3px);
    border-color: rgba(215,199,168,0.20);
    box-shadow: 0 14px 30px rgba(0,0,0,0.28);
}

.horse-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.horse-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.horse-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.9rem 1rem 1rem;
    text-align: center;
}

.horse-info h3 {
    margin: 0 0 0.35rem;
    font-family: "Roboto", sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: #F2EEE7;
}

.horse-info p,
.horse-info span {
    margin: 0;
    color: #D7C7A8;
}

.horse-info p {
    font-size: 0.92rem;
}

.horse-info span {
    margin-top: 0.45rem;
    font-size: 0.82rem;
}

/* Hevosen sivu */

.profile-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 48%);
    gap: 2.5rem;
    align-items: center;
    background:
        radial-gradient(circle at bottom left, rgba(184, 119, 146, .14), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015));
    box-shadow: 0 18px 45px rgba(0,0,0,.28);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 0.85rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.profile-intro h1 {
    margin: 0;
    font-size: clamp(1.8rem, 3.8vw, 3.5rem);
    line-height: .95;
    font-weight: 400;
    color: #e8d9bd;
    letter-spacing: -.04em;
    overflow-wrap: break-word;
}

.profile-reg {
    margin: 0.35rem 0 1.35rem;
    color: #A88A4A;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
}

.profile-basic-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.profile-basic-list li {
    position: relative;
    padding-left: 1.35rem;
    color: #F2EEE7;
}

.profile-basic-list li::before {
    content: "✴︎";
    position: absolute;
    left: 0;
    top: 0.18rem;
    color: #D7C7A8;
    font-size: 0.8rem;
}

.profile-basic-list span {
    display: inline-block;
    min-width: 7.5rem;
    color: #C9C2B8;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}

.profile-photo {
    margin: 0;
}

.profile-photo img {
    width: 100%;
    display: block;
    border-radius: 0.75rem;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 16px 40px rgba(0,0,0,0.32);
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.horse-gallery {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.horse-gallery-image {
    max-height: 150px;
    border-radius: 0.5rem;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.ped-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 6px;
    margin-block: 1.5rem;
}

.ped-table td {
    padding: 10px 20px;
    border-radius: 0.5rem;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    line-height: 1.5em;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.ped-table td:hover {
    transform: translateY(-2px);
    border-color: rgba(215,199,168,0.20);
    box-shadow: 0 14px 30px rgba(0,0,0,0.28);
}

.ped-name a:link, .ped-name a:visited {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.ped-info {
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.ped-merits {
    color: #F2EEE7;
    font-weight: 700;
    font-size: 0.8rem;
}

.ped-prefix {
    text-transform: uppercase;
    margin-bottom: 0.4rem;
    color: #D7C7A8;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.traits {
    max-width: 900px;
    margin: 3rem auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
}

.trait-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.trait-list li {
    position: relative;
    padding: 0.5rem 0 0.5rem 1.65rem;
    border-bottom: 1px solid rgba(255,255,255,0.055);
    font-weight: 600;
}

.traits li {
    padding: 0.45rem 0 0.45rem 1.5rem;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.055);
}

.plus-list li::before {
    content: "+";
    position: absolute;
    left: 0;
    color: #D7C7A8;
    font-weight: 700;
}

.minus-list li::before {
    content: "–";
    position: absolute;
    left: 0;
    color: #C9C2B8;
    font-weight: 700;
}

.horse-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.25rem;
}

.level-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.level-card {
    padding: 1.35rem 1.45rem;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 1.2rem;
    background:
        radial-gradient(circle at top left, rgba(184, 119, 146, .14), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015));
    box-shadow: 0 18px 45px rgba(0,0,0,.28);
}

.level-head {
    display: flex;
    justify-content: space-between;
    gap: 1.25rem;
    align-items: center;
    margin-bottom: 1rem;
}

.level-kicker {
    display: block;
    margin-bottom: .35rem;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #c994aa;
}

.level-head h2 {
    margin: 0;
    font-size: clamp(1rem, 2vw, 1.45rem);
    color: #eee9df;
}

.level-head h2 small {
    color: #b7aa9b;
    font-size: .8em;
}

.level-number {
    min-width: 82px;
    text-align: right;
    font-size: 1rem;
    font-weight: 800;
    color: #f1e8d7;
    line-height: 1;
}

.level-bar {
    position: relative;
    height: 15px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.065);
    box-shadow: inset 0 1px 4px rgba(0,0,0,.45);
}

.level-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #8f6174, #c792a8, #e0c4a1);
    box-shadow: 0 0 18px rgba(199, 146, 168, .35);
}

.level-meta {
    display: flex;
    justify-content: space-between;
    margin-top: .55rem;
    font-size: .78rem;
    font-weight: 700;
    color: #bdb5aa;
}

.attribute-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: .65rem;
    margin-top: 1.15rem;
}

.attribute-pill {
    padding: .75rem .85rem;
    border: 1px solid rgba(255,255,255,.075);
    border-radius: 14px;
    background: rgba(0,0,0,.16);
}

.attribute-pill span {
    display: block;
    margin-bottom: .25rem;
    font-size: .76rem;
    color: #bda8b2;
}

.attribute-pill strong {
    color: #f1eee8;
    font-size: .92rem;
}

.level-error {
    margin: 2rem 0;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(184, 119, 146, .12);
    color: #eee9df;
}


.hevosen-meriitit {
  margin-top: 10px;
}

.meriitit {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-block: 1rem;
}

.palkinto {
    background:
        radial-gradient(circle at bottom left, rgba(184, 119, 146, .14), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015));
    box-shadow: 0 18px 45px rgba(0,0,0,.28);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 0.85rem;
  padding: 8px 10px;
    text-align: center;
  color: #f0f0f0;
}

.palkinto small {
  color: #bd829977; // tai joku muu väri
}


/* Yleiset */

.arcadia-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    margin-block: 0.8rem;
}

.arcadia-table thead {
    border: 1px solid rgba(255,255,255,.08);
    background:
        radial-gradient(circle at top left, rgba(184, 119, 146, .14), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015));
}

.arcadia-table tr {
    padding-block: 0.5rem;
}

.arcadia-table tr:hover {
    background: rgb(255 255 255 / 0.04);
}

@media (max-width: 700px) {
    .profile-intro {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 590px) {
    header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .header-title {
        margin-inline: auto;
        text-align: center;
        font-size: 2.4rem;
    }

    .nav-toggle {
        display: inline-block;
        margin-inline: auto;
        appearance: none;
        border: 1px solid rgba(215,199,168,0.18);
        background: rgb(255 255 255 / 0.04);
        color: #D7C7A8;
        font: inherit;
        font-weight: 500;
        padding: 0.7rem 1rem;
        border-radius: 999px;
        cursor: pointer;
        transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
    }

    .nav-toggle:hover {
        background: rgb(255 255 255 / 0.08);
        color: #F2EEE7;
        border-color: rgba(215,199,168,0.35);
    }

    .site-nav {
        width: 100%;
        margin: 0;
        padding: 0;

        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.9rem;

        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transform: translateY(-0.5rem);

        transition:
            max-height 0.45s ease,
            opacity 0.3s ease,
            transform 0.3s ease,
            padding-top 0.3s ease;
    }

    .site-nav.is-open {
        max-height: 500px;
        opacity: 1;
        transform: translateY(0);
        padding-top: 1rem;
    }

    .site-nav a {
        display: inline-block;
    }

    .site-nav a::after {
        bottom: -4px;
    }

    .img-left,
    .img-right {
        float: none;
        margin: 0 auto 1rem auto;
        max-width: 100%;
    }
}