
/* =========================
   GLOBAL STYLES
========================= */

:root {
    --color-background: #f5f2ee;
    --color-surface: #ffffff;
    --color-primary: #62564b;
    --color-primary-dark: #443a32;
    --color-accent: #c49a6c;
    --color-text: #302c28;
    --color-muted: #827b73;
    --color-border: #e8e1d9;
    --color-danger: #a94442;
    --shadow-soft: 0 8px 30px rgba(48, 44, 40, 0.07);
}

* {
    box-sizing: border-box;
}

body {
    max-width: 1200px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 3rem 2rem;
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-background);
}

h1, h2, h3 {
    color: var(--color-primary-dark);
    line-height: 1.25;
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: -1.5px;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
}


.page-header {
    max-width: 650px;
    margin-bottom: 2.5rem;
}

.eyebrow {
    color: var(--color-accent);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.intro,
.section-description {
    color: var(--color-muted);
    max-width: 600px;
}

.feedback-section {
    margin-bottom: 4rem;
}

.submitted-feedback {
    margin-top: 4rem;
}


/* =========================
   FEEDBACK FORM
========================= */

#feedback-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    width: 100%;
    max-width: 540px;
    padding: 2rem;
    margin-top: 2rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#feedback-form label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-primary-dark);
}

#feedback-form input:not([type="radio"]),
#feedback-form textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fcfbfa;
    color: var(--color-text);
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#feedback-form textarea {
    min-height: 130px;
    resize: vertical;
}

#feedback-form input:not([type="radio"])::placeholder,
#feedback-form textarea::placeholder {
    color: #aaa29a;
    font-size: 0.9rem;
}

#feedback-form input:not([type="radio"]):focus-visible,
#feedback-form textarea:focus-visible {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(196, 154, 108, 0.18);
}

/* =========================
   STAR RATING
========================= */

.star-rating-group {
    border: none;
    padding: 0;
    margin: 0.5rem 0;
}

.star-rating-group legend {
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: var(--color-primary-dark);
}

.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    font-size: 2.7rem;
}

.star-rating input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

/* Empty stars by default */

.star-rating label {
    color: #f5f0e9;
    -webkit-text-stroke: 2px #8a7562;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.2s ease, transform 0.2s ease;
}

/* Hover */

.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #e9b65f;
    -webkit-text-stroke: 1.5px #e9b65f;
}

.star-rating label:hover {
    transform: scale(1.15);
}

/* Selected stars */

.star-rating input[type="radio"]:checked ~ label {
    color: #e9b65f;
    -webkit-text-stroke: 1.5px #e9b65f;
}

/* Keyboard focus */

.star-rating input[type="radio"]:focus-visible + label {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
    border-radius: 3px;
}

/* =========================
   BUTTONS
========================= */

button {
    padding: 0.8rem 1.3rem;
    border: none;
    border-radius: 10px;
    background: var(--color-primary);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease,
                transform 0.2s ease,
                box-shadow 0.2s ease;
}

button:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(48, 44, 40, 0.15);
}

button:active {
    transform: translateY(0);
}

button:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-secondary {
    background: #eee9e3;
    color: var(--color-primary-dark);
}

.btn-danger {
    background: var(--color-danger);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
}

.btn-secondary:hover {
    background: #ded6cd;
}

.btn-danger:hover {
    background: #873735;
}

/* =========================
   FEEDBACK CARDS
========================= */

#feedback-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 1.5rem;
    align-items: stretch;
    margin-top: 3rem;
}

.feedback-card {
    width: 100%;
    padding: 1.7rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    overflow-wrap: anywhere;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feedback-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 35px rgba(48, 44, 40, 0.11);
}

.feedback-card h3 {
    margin-top: 0;
    margin-bottom: 0.4rem;
}

.feedback-card p {
    color: var(--color-muted);
}

.feedback-card button {
    margin: 0.5rem 0.5rem 0 0;
}

/* =========================
   RESPONSIVE DESIGN
========================= */

@media (max-width: 600px) {
    body {
        padding: 1.5rem 1rem;
    }

    #feedback-form {
        padding: 1.3rem;
        border-radius: 15px;
    }

    #feedback-list {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 2rem;
    }

    .feedback-card {
        padding: 1.3rem;
    }

    .star-rating {
        font-size: 2.3rem;
    }
}

/* =========================
   REDUCED MOTION
========================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
