/* ═══════════════════════════════════════
   Siremar Grupp OÜ — Main Page Styles
   ═══════════════════════════════════════ */

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

:root {
    --bg:     #0C0C0A;
    --ink:    #F0EDE8;
    --muted:  rgba(240,237,232,0.4);
    --border: rgba(255,255,255,0.07);
    --page-max: 1020px;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0;
}

/* Grain texture */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

/* Ambient glow layer */
#ambientBg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    transition: background 1s ease;
}

/* ── Brand stripe ── */
.brand-stripe {
    height: 3px;
    background: linear-gradient(90deg, #F13C20 25%, #4056A1 25% 50%, #B8862B 50% 75%, #EA193C 75%);
}

/* ── Centered page column ── */
.page {
    position: relative;
    z-index: 1;
    max-width: var(--page-max);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
}

/* ── Header ── */
header {
    padding: 52px 56px 44px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    animation: fadeUp 0.7s ease both;
}

.header-eyebrow {
    font-size: 10px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 400;
    margin-bottom: 12px;
}

h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 56px;
    font-weight: 300;
    line-height: 1;
    color: var(--ink);
}

h1 em {
    font-style: italic;
    opacity: 0.4;
}

.header-reg {
    font-size: 11px;
    color: var(--muted);
    font-weight: 300;
    letter-spacing: 0.06em;
}

/* ── Main ── */
main {
    flex: 1;
    padding: 52px 56px 64px;
    animation: fadeUp 0.7s 0.1s ease both;
}

.section-label {
    font-size: 10px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 400;
    margin-bottom: 28px;
}

/* ── Brand grid ── */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* ════════════════════════════
   Base card
════════════════════════════ */
.brand-card {
    display: block;
    text-decoration: none;
    border-radius: 10px;
    padding: 36px;
    min-height: 250px;
    position: relative;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.23,1,0.32,1), box-shadow 0.35s ease;
    cursor: pointer;
}

/* Hover lift — only on pointer devices */
@media (hover: hover) {
    .brand-card:hover {
        transform: translateY(-6px) scale(1.005);
    }
}

/* Tap feedback on touch */
@media (hover: none) {
    .brand-card:active {
        transform: scale(0.97);
        transition: transform 0.1s ease;
    }
}

.card-tag {
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-weight: 400;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.card-logo {
    display: block;
    height: 38px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    object-position: left center;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.card-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 36px;
    font-weight: 400;
    line-height: 1.05;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.card-desc {
    font-size: 13.5px;
    line-height: 1.6;
    font-weight: 300;
    opacity: 0.65;
    position: relative;
    z-index: 1;
}

/* CTA: hidden by default, shown on hover */
.card-cta {
    display: inline-block;
    margin-top: 22px;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 500;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

@media (hover: hover) {
    .brand-card:hover .card-cta {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Always show CTA on touch devices */
@media (hover: none) {
    .card-cta {
        opacity: 1;
        transform: none;
    }
}

/* ════════════════════════════
   SIREMAR — cream card
════════════════════════════ */
.card-siremar {
    background: #FEFCF8;
    color: #111;
    border: 1px solid rgba(0,0,0,0.06);
}

@media (hover: hover) {
    .card-siremar:hover {
        box-shadow: 0 24px 64px rgba(241,60,32,0.15), 0 4px 16px rgba(0,0,0,0.08);
    }
}

.card-siremar .card-tag  { color: #888; }
.card-siremar .card-cta  { color: #F13C20; }

.siremar-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.siremar-dot { width: 10px; height: 10px; border-radius: 50%; }

.siremar-dot:nth-child(1) { background: #F13C20; animation: dotBounce 2.2s 0.00s ease-in-out infinite; }
.siremar-dot:nth-child(2) { background: #4056A1; animation: dotBounce 2.2s 0.25s ease-in-out infinite; }
.siremar-dot:nth-child(3) { background: #D79920; animation: dotBounce 2.2s 0.50s ease-in-out infinite; }
.siremar-dot:nth-child(4) { background: #448844; animation: dotBounce 2.2s 0.75s ease-in-out infinite; }

@keyframes dotBounce {
    0%, 100% { transform: translateY(0)   scale(1);    }
    40%       { transform: translateY(-5px) scale(1.2); }
    60%       { transform: translateY(0)   scale(0.95); }
}

/* ════════════════════════════
   FOXSENIOR — dark violet
════════════════════════════ */
.card-foxsenior {
    background: #2A1830;
    color: #F7F4EF;
    border: 1px solid rgba(184,134,43,0.15);
}

@media (hover: hover) {
    .card-foxsenior:hover {
        box-shadow: 0 24px 64px rgba(184,134,43,0.18), 0 0 0 1px rgba(184,134,43,0.3);
    }
}

.card-foxsenior .card-tag  { color: rgba(247,244,239,0.4); }
.card-foxsenior .card-name { color: #B8862B; }
.card-foxsenior .card-cta  { color: #B8862B; }

.foxsenior-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        transparent 30%,
        rgba(184,134,43,0.07) 45%,
        rgba(212,168,75,0.12) 50%,
        rgba(184,134,43,0.07) 55%,
        transparent 70%
    );
    animation: shimmerSweep 5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmerSweep {
    0%   { transform: translateX(-120%); }
    60%  { transform: translateX(120%);  }
    100% { transform: translateX(120%);  }
}

/* ════════════════════════════
   JÕULUKONTOR — white + red
════════════════════════════ */
.card-joulukontor {
    background: #FFFFFF;
    color: #111;
    border: 1px solid rgba(0,0,0,0.06);
}

@media (hover: hover) {
    .card-joulukontor:hover {
        box-shadow: 0 24px 64px rgba(234,25,60,0.15), 0 4px 16px rgba(0,0,0,0.06);
    }
}

.card-joulukontor .card-logo { height: 56px; max-width: 100%; }
.card-joulukontor .card-tag  { color: #EA193C; }
.card-joulukontor .card-cta  { color: #EA193C; }

.joulukontor-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.snowflake {
    --dur: 5s;
    --del: 0s;
    --op: 0.35;
    --fall: 260px;
    --drift: 0px;
    --rot: 180deg;
    position: absolute;
    overflow: visible;
    color: #EA193C;
    animation: flakeFall var(--dur) var(--del) linear infinite;
}

@keyframes flakeFall {
    0%   { transform: translateY(0)          translateX(0)          rotate(0deg);      opacity: 0; }
    8%   { opacity: var(--op); }
    90%  { opacity: var(--op); }
    100% { transform: translateY(var(--fall)) translateX(var(--drift)) rotate(var(--rot)); opacity: 0; }
}

/* ════════════════════════════
   RAAMATUPIDAMINE — dark glass
════════════════════════════ */
.card-bookkeeping {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    color: var(--ink);
}

@media (hover: hover) {
    .card-bookkeeping:hover {
        box-shadow: 0 24px 64px rgba(92,130,145,0.12), 0 0 0 1px rgba(92,130,145,0.2);
    }
}

.card-bookkeeping .card-tag  { color: var(--muted); }
.card-bookkeeping .card-name { color: #7AAAB8; }
.card-bookkeeping .card-desc { opacity: 0.5; }
.card-bookkeeping .card-cta  { color: #7AAAB8; }

/* Subtle grid background */
.card-bookkeeping::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

/* ── Card load animations ── */
.brand-card:nth-child(1) { animation: fadeUp 0.6s 0.18s ease both; }
.brand-card:nth-child(2) { animation: fadeUp 0.6s 0.27s ease both; }
.brand-card:nth-child(3) { animation: fadeUp 0.6s 0.36s ease both; }
.brand-card:nth-child(4) { animation: fadeUp 0.6s 0.45s ease both; }

/* ── Footer ── */
footer {
    border-top: 1px solid var(--border);
    padding: 22px 56px;
    display: flex;
    justify-content: space-between;
}

.footer-text {
    font-size: 11px;
    color: var(--muted);
    font-weight: 300;
}

/* ── Animations ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* ── Responsive ── */
@media (max-width: 700px) {
    header       { padding: 32px 24px 28px; flex-direction: column; align-items: flex-start; gap: 10px; }
    h1           { font-size: 40px; }
    main         { padding: 36px 24px 48px; }
    .brand-grid  { grid-template-columns: 1fr; }
    footer       { padding: 20px 24px; }
    .card-name   { font-size: 30px; }

    .card-siremar     { order: 1; }
    .card-foxsenior   { order: 2; }
    .card-joulukontor { order: 3; }
    .card-bookkeeping { order: 4; }
}
