:root{
    --ih-red: #b3201a;
    --ih-red-dark: #7d1511;
    --barn: #2b1d14;
    --barn-light: #3a281c;
    --oak: #c99a5b;
    --oak-dark: #8a6232;
    --chalk: #f3ead8;
    --ink: #231810;
    --shadow: 0 10px 24px rgba(20,10,5,0.35);
}
*{box-sizing:border-box;}
html,body{margin:0;padding:0;background:var(--chalk);color:var(--ink);font-family:'Work Sans',sans-serif;}
h1,h2,h3{margin:0;}

/* ---------- HERO: Holzbrett-Schild ---------- */
.hero{
    background:
        repeating-linear-gradient(90deg, transparent 0 118px, rgba(0,0,0,0.35) 118px 120px),
        var(--barn);
    color:var(--chalk);
    padding:56px 20px 44px;
    text-align:center;
    border-bottom:8px solid var(--ih-red);
}
.sign{
    display:inline-flex;
    align-items:center;
    gap:clamp(12px,3vw,28px);
    flex-wrap:wrap;
    justify-content:center;
    background:
        repeating-linear-gradient(0deg, rgba(0,0,0,0.12) 0 2px, transparent 2px 7px),
        var(--oak);
    color:var(--barn);
    padding:26px clamp(20px,5vw,48px);
    border-radius:4px;
    border:4px solid var(--oak-dark);
    box-shadow:var(--shadow), inset 0 0 0 3px rgba(255,255,255,0.12);
    transform:rotate(-1.5deg);
}
.sign-names{ display:flex; align-items:baseline; gap:12px; }
.who{
    font-family:'Alfa Slab One',serif;
    font-size:clamp(34px,8vw,64px);
    line-height:1;
}
.age{
    font-family:'Alfa Slab One',serif;
    font-size:clamp(34px,8vw,64px);
    line-height:1;
    color:var(--ih-red);
    text-shadow:1px 1px 0 rgba(255,255,255,0.35);
}
.amp{
    font-family:'Alfa Slab One',serif;
    font-size:clamp(26px,5vw,40px);
    opacity:0.7;
}
.hero-sub{
    font-size:clamp(14px,2.6vw,17px);
    font-weight:500;
    margin:26px 0 0;
    color:var(--oak);
}
.quote-text{
    font-family:'Alfa Slab One',serif;
    font-size:clamp(15px,3vw,20px);
    min-height:28px;
    margin:14px auto 0;
    max-width:620px;
    line-height:1.4;
    opacity:0;
    transition:opacity .5s ease;
}
.quote-text.show{ opacity:1; }

/* ---------- SECTIONS ---------- */
section{ max-width:980px; margin:0 auto; padding:56px 20px; }
.section-title{
    font-family:'Alfa Slab One',serif;
    font-size:clamp(26px,5vw,38px);
    font-weight:400;
    color:var(--ih-red);
    text-align:center;
    margin-bottom:10px;
}
.section-title.on-dark{ color:var(--oak); }
.section-desc{
    text-align:center;
    max-width:540px;
    margin:0 auto 34px;
    color:#5b4636;
    font-size:15px;
    line-height:1.65;
}

/* ---------- UPLOAD ---------- */
.upload-card{
    background:#fffaf0;
    border:3px solid var(--barn);
    border-radius:4px;
    padding:30px;
    box-shadow:8px 8px 0 var(--oak);
}
.field{ margin-bottom:20px; }
.field label{
    display:block;
    font-weight:600;
    font-size:14px;
    color:var(--ih-red-dark);
    margin-bottom:7px;
}
.field input[type=text], .field textarea{
    width:100%;
    border:2px solid #d8c6a8;
    border-radius:3px;
    padding:12px 14px;
    font-family:inherit;
    font-size:15px;
    background:#fff;
    resize:vertical;
}
.field input[type=text]:focus, .field textarea:focus{
    outline:3px solid rgba(179,32,26,0.25);
    border-color:var(--ih-red);
}
.dropzone{
    border:2px dashed var(--oak-dark);
    border-radius:3px;
    padding:28px;
    text-align:center;
    cursor:pointer;
    background:#f6ecd6;
    transition:background .15s;
}
.dropzone.drag{ background:#efdcb4; border-color:var(--ih-red); }
.dropzone input{ display:none; }
.dropzone p{ margin:0; font-size:14px; color:#6d5238; }
.dropzone .preview{
    max-width:180px; max-height:180px;
    margin:0 auto 12px;
    border:3px solid #fff;
    box-shadow:var(--shadow);
    display:none;
}
.submit-btn{
    display:block; width:100%;
    margin-top:8px;
    background:var(--ih-red);
    color:var(--chalk);
    border:none;
    border-radius:3px;
    padding:15px;
    font-family:'Alfa Slab One',serif;
    font-size:17px;
    cursor:pointer;
    transition:background .15s;
}
.submit-btn:hover{ background:var(--ih-red-dark); }
.submit-btn:focus-visible, .download-all-btn:focus-visible{ outline:3px solid var(--oak); outline-offset:2px; }
.submit-btn:disabled{ background:#b99c93; cursor:not-allowed; }
.form-msg{ text-align:center; font-size:14px; margin-top:12px; min-height:18px; }
.form-msg.error{ color:var(--ih-red-dark); font-weight:600; }
.form-msg.ok{ color:#2e6b3f; font-weight:600; }

/* ---------- GALERIE: dunkle Scheunenwand ---------- */
.gallery-section{
    max-width:none;
    background:
        repeating-linear-gradient(90deg, transparent 0 158px, rgba(0,0,0,0.3) 158px 160px),
        var(--barn-light);
}
.gallery-section > *{ max-width:940px; margin-left:auto; margin-right:auto; }
.gallery-toolbar{
    display:flex; flex-wrap:wrap; gap:14px;
    align-items:center; justify-content:center;
    margin-bottom:30px;
}
.gallery-count{ font-size:14px; font-weight:600; color:var(--oak); }
.download-all-btn{
    background:transparent;
    color:var(--chalk);
    border:2px solid var(--oak);
    border-radius:3px;
    padding:9px 18px;
    font-family:'Alfa Slab One',serif;
    font-size:13px;
    cursor:pointer;
    transition:background .15s, color .15s;
}
.download-all-btn:hover{ background:var(--oak); color:var(--barn); }
.download-all-btn:disabled{ opacity:0.5; cursor:not-allowed; }

.gallery-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
    gap:34px 26px;
    padding-top:10px;
}
.polaroid{
    background:var(--chalk);
    padding:12px 12px 46px;
    box-shadow:var(--shadow);
    position:relative;
    transition:transform .2s;
}
.polaroid:hover{ transform:translateY(-4px) rotate(0deg) !important; z-index:5; }
.polaroid img{
    width:100%; aspect-ratio:1/1;
    object-fit:cover; display:block;
    background:#ddd;
}
/* Nagel statt Pin */
.polaroid .pin{
    position:absolute;
    top:-8px; left:50%; transform:translateX(-50%);
    width:14px; height:14px;
    border-radius:50%;
    background:radial-gradient(circle at 35% 35%, #d9d9d9, #6b6b6b);
    box-shadow:0 2px 4px rgba(0,0,0,0.5);
}
.polaroid .cap-name{
    position:absolute;
    bottom:24px; left:14px; right:14px;
    font-family:'Alfa Slab One',serif;
    font-size:14px;
}
.polaroid .cap-text{
    position:absolute;
    bottom:8px; left:14px; right:14px;
    font-size:11px;
    color:#7a6650;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.polaroid .dl{
    position:absolute; top:16px; left:16px;
    background:rgba(35,24,16,0.65);
    color:#fff;
    border-radius:50%;
    width:24px; height:24px;
    font-size:12px; line-height:1;
    display:flex; align-items:center; justify-content:center;
    text-decoration:none;
}
.polaroid .del{
    position:absolute; top:16px; right:16px;
    background:rgba(179,32,26,0.9);
    color:#fff; border:none; border-radius:50%;
    width:22px; height:22px;
    font-size:13px; line-height:1;
    cursor:pointer;
    display:none;
}
.polaroid.mine .del{ display:block; }

.empty-state{
    text-align:center;
    color:var(--oak);
    font-size:14px;
    padding:40px 0;
    grid-column:1/-1;
}

footer{
    text-align:center;
    padding:36px 20px 56px;
    font-family:'Alfa Slab One',serif;
    color:var(--ih-red-dark);
    font-size:18px;
}
footer span{
    display:block;
    font-family:'Work Sans',sans-serif;
    font-size:12px;
    color:#8a7560;
    margin-top:6px;
}

@media (max-width:520px){
    .upload-card{ padding:20px; box-shadow:5px 5px 0 var(--oak); }
}
@media (prefers-reduced-motion:reduce){
    .quote-text, .polaroid{ transition:none; }
}

/* ---------- IHC-Design ---------- */
/* Emblem: rotes Rund mit weißem Ring und IH, wie am Kühlergrill */
.hero{ position:relative; border-bottom:none; padding-top:44px; }
.hero::before{
    content:"IH";
    display:flex; align-items:center; justify-content:center;
    width:84px; height:84px;
    margin:0 auto 26px;
    border-radius:50%;
    background:var(--ih-red);
    color:#fff;
    font-family:'Alfa Slab One',serif;
    font-size:38px;
    letter-spacing:-1px;
    border:4px solid #fff;
    box-shadow:0 0 0 4px var(--ih-red), var(--shadow);
}
/* Farmall-Streifen unter dem Hero: rot, weiß, rot */
.hero::after{
    content:"";
    position:absolute; left:0; right:0; bottom:0;
    height:14px;
    background:linear-gradient(var(--ih-red) 0 5px, #fff 5px 9px, var(--ih-red) 9px 14px);
}
.hero{ padding-bottom:58px; }

/* Schild mit Schrauben, als hinge es am Scheunentor */
.sign{ position:relative; }
.sign::before, .sign::after{
    content:"";
    position:absolute; top:50%;
    width:11px; height:11px;
    margin-top:-6px;
    border-radius:50%;
    background:radial-gradient(circle at 35% 35%, #e6e6e6, #5f5f5f);
    box-shadow:0 1px 2px rgba(0,0,0,0.5);
}
.sign::before{ left:10px; }
.sign::after{ right:10px; }

/* Überschriften mit rot-weißem Balken */
.section-title::after{
    content:"";
    display:block;
    width:90px; height:8px;
    margin:12px auto 0;
    background:linear-gradient(var(--ih-red) 0 3px, #fff 3px 5px, var(--ih-red) 5px 8px);
    border-radius:1px;
}
.section-title.on-dark::after{ background:linear-gradient(var(--ih-red) 0 3px, var(--chalk) 3px 5px, var(--ih-red) 5px 8px); }

/* Upload-Karte: rotes Kopfband wie am Traktor-Blech */
.upload-card{ border-top:14px solid var(--ih-red); }

/* Galerie: roter Streifen oben, Polaroids bekommen roten Fuß-Akzent */
.gallery-section{ border-top:14px solid var(--ih-red); }
.polaroid{ border-bottom:5px solid var(--ih-red); }

/* Footer mit Streifen */
footer{ border-top:14px solid var(--ih-red); background:var(--chalk); }

@media (max-width:520px){
    .hero::before{ width:68px; height:68px; font-size:30px; }
}
