@font-face {
    font-family: "Open Sans";
    src: url("./font-family/static/OpenSans-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Open Sans";
    src: url("./font-family/static/OpenSans-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
}
/* Fluid root size: grows a little with the viewport but stays readable (14px to 18px). */
html {
    font-size: clamp(14px, calc(0.3vw + 11px), 18px);
    scroll-behavior: smooth;
    scroll-padding-top: 4.5rem;
}
body {
    font-family: "Open Sans", Arial, sans-serif;
    color: #1d1d1d;
    background: #fff;
    line-height: 1.5;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
h2 { font-size: 1.9rem; line-height: 1.25; }
section { padding: 3rem 1.5rem; }

.btn {
    display: inline-block;
    color: #fff;
    background-color: #067a46;
    border: 2px solid #067a46;
    padding: 0.6rem 2.5rem;
    font-weight: 700;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}
.btn:hover, .btn:focus-visible { background-color: #04603a; border-color: #04603a; }
.btn-outline { color: #067a46; background: transparent; }
.btn-outline:hover, .btn-outline:focus-visible { color: #fff; }

/* navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem clamp(1rem, 4vw, 4rem);
    background-color: aliceblue;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.logo img { width: 93px; }
.links {
    display: flex;
    align-items: center;
    gap: clamp(0.8rem, 2vw, 2rem);
}
.links a { color: #131414; }
.links a:hover { color: #067a46; }
.links .login {
    color: #067a46;
    border: 2px solid;
    padding: 0.35em 0.9em;
    font-weight: 700;
}
.bars {
    display: none;
    background: none;
    border: 0;
    color: #1e1f20;
    cursor: pointer;
}

/* page1 hero */
.page1 {
    background: url("./images/page1.webp") no-repeat center / cover;
    min-height: min(80vh, 46vw);
    display: flex;
    justify-content: center;
    padding-top: clamp(7rem, 15vw, 15rem);
    text-align: center;
}
.hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 22rem;
}
.page1 h1 { font-size: 2rem; line-height: 1.2; }

/* page2 */
.page2 { text-align: center; }
.page2 h2 { margin-bottom: 2rem; }
.why {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto 2.5rem;
}
.A { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.A img { width: 8rem; height: 8rem; }

/* page3 */
.page3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
}
.left { flex: 1 1 0; }
.right { flex: 1 1 0; display: flex; flex-direction: column; gap: 1rem; }
.right li { padding: 0.4rem 0; }
.right li::before { content: "✓ "; color: #067a46; font-weight: 700; }
.right .btn { align-self: flex-start; }

/* page4 recipes */
.page4 { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.5rem; }
.over p { margin-top: 0.5rem; }
.carousel {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 1200px;
}
.arrow {
    flex: 0 0 auto;
    background: none;
    border: 0;
    cursor: pointer;
    border-radius: 50%;
}
.arrow img { width: 2.8rem; height: 2.8rem; }
.page4_img {
    flex: 1;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 3rem) / 4);
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.page4_img::-webkit-scrollbar { display: none; }
.card {
    aspect-ratio: 5 / 6;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-align: left;
    background: no-repeat center / cover;
    scroll-snap-align: start;
}
.card h3 { font-size: 1.1rem; background-color: beige; padding: 0.2rem 0.5rem 0; }
.card p { font-size: 0.8rem; background-color: beige; padding: 0 0.5rem 0.3rem; }
.img1 { background-image: url("./images/page4-1.jpg"); }
.img2 { background-image: url("./images/page4-2.jpg"); }
.img3 { background-image: url("./images/page4-3.jpg"); }
.img4 { background-image: url("./images/page4-4.jpg"); }

/* page5 community */
.page5 { text-align: center; }
.page5img {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 2rem auto 0;
}
.C img { width: 100%; aspect-ratio: 1; object-fit: cover; margin-bottom: 0.6rem; }
.C strong { display: block; }

/* page6 plans */
.page6 {
    background: url("./images/page6.webp") no-repeat center / cover;
    min-height: 16rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
}

/* plan request form (sends to the Spring Boot API, see hellofresh.js) */
.plan-form {
    width: 100%;
    max-width: 40rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 4px;
    text-align: left;
}
.plan-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.8rem; }
.plan-form label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; font-weight: 700; }
.plan-form select, .plan-form input {
    font: inherit;
    font-weight: 400;
    font-size: 1rem;
    min-height: 44px;
    padding: 0.45rem 0.6rem;
    border: 1px solid #999;
    border-radius: 4px;
    background: #fff;
    color: #1d1d1d;
}
.plan-form select:focus-visible, .plan-form input:focus-visible { outline: 2px solid #067a46; outline-offset: 1px; }
.plan-form input[aria-invalid="true"] { border-color: #b3261e; }
.plan-form .plan-price { font-weight: 700; color: #067a46; background: none; padding: 0; }
.plan-form .btn { align-self: flex-start; cursor: pointer; font: inherit; font-weight: 700; }
.plan-form .btn:disabled { opacity: 0.7; cursor: wait; }
.plan-form .form-status { background: none; padding: 0; font-size: 0.95rem; min-height: 1.5em; }
.plan-form .form-status.success { color: #067a46; font-weight: 700; }
.plan-form .form-status.error { color: #b3261e; font-weight: 700; }
.plan-form .form-status.info { color: #1d3b8f; font-weight: 700; }
.plan-form .form-note { background: none; padding: 0; font-size: 0.85rem; color: #444; }

/* page7 faq */
.page7 h2 { text-align: center; margin-bottom: 1.5rem; }
.more { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.6rem; }
.more summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.15rem;
    color: #1d3b8f;
    cursor: pointer;
    list-style: none;
}
.more summary::-webkit-details-marker { display: none; }
.more summary img { width: 2rem; height: 2rem; transition: transform 0.2s; }
.more details[open] summary img { transform: rotate(180deg); }
.more details p { padding: 0.5rem 0 0.5rem 3rem; }

/* footer */
footer { padding: 2rem clamp(1rem, 4vw, 4rem) 1rem; background: #f7f7f7; }
.page8 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 1.5rem;
}
.D h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.D li { font-size: 0.9rem; color: #444; padding: 0.15rem 0; }
.son {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid #ccc;
    padding-top: 1rem;
    font-size: 0.85rem;
}
.finish a { color: #067a46; text-decoration: underline; overflow-wrap: anywhere; }
.s { display: inline-flex; gap: 0.5rem; align-items: center; color: #1e1f20; text-decoration: none; font-weight: 600; white-space: nowrap; }
.s:hover, .s:focus-visible { color: #067a46; text-decoration: underline; }
/* arrow-next.png has more transparent padding than arrow-prev.png */
.arrow.next img { width: 5.3rem; height: 5.3rem; margin: -1.25rem; }
.page6 h2, .page6 p { background: rgba(255, 255, 255, 0.85); padding: 0.2rem 1rem; border-radius: 4px; }
