/* Filotimo Creations — Home
   Recreated from the hifi design handoff (filotimo_creations_concept_website). */

/* Self-hosted variable fonts (latin subset, from Google Fonts). Same-origin +
   preloaded in the HTML so they arrive before the entrance animation starts —
   a late font swap reflows the whole header mid-fade and reads as stutter.
   One variable file per family covers every weight used. */
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url('fonts/cormorant-garamond-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Cormorant Garamond';
    font-style: italic;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/cormorant-garamond-italic-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Mulish';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('fonts/mulish-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

/* Paint the document canvas itself. During fast scrolling on Android the
   browser can expose the canvas below/behind the fixed .bg layer before the
   compositor catches up (and on overscroll), and the canvas defaults to
   white — no fixed element can cover it. Same gradient, viewport-fixed, so
   any transiently exposed strip matches the site background. */
html {
    background: #2c2270; /* fallback where fixed-attachment gradients degrade */
    background-image: linear-gradient(135deg, #241a5e 0%, #3b2f8c 34%, #6f5aa0 56%, #c98a63 80%, #f4c24a 100%);
    background-attachment: fixed;
}

/* The prototype used overflow:hidden, but that clips (and makes unreachable)
   the products/footer on shorter viewports; the fixed bg layers can't cause
   scrollbars, so normal flow scrolling only kicks in when content overflows. */
body {
    min-height: 100vh;
    overflow-x: hidden;
    font-family: 'Mulish', sans-serif;
    -webkit-font-smoothing: antialiased;
    color: #fff;
}

/* Background: fixed dusk gradient + radial vignette overlay */
.bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    /* Cover the LARGE viewport (URL bar hidden) so the gradient still fills the
       screen once the Android top bar recedes — inset:0 only sizes to the small
       viewport and leaves a growing white strip at the bottom as you scroll. */
    height: 100lvh;
    z-index: 0;
    background: linear-gradient(135deg, #241a5e 0%, #3b2f8c 34%, #6f5aa0 56%, #c98a63 80%, #f4c24a 100%);
}

.bg::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(120% 80% at 50% 42%, rgba(255,236,190,.16), rgba(0,0,0,0) 55%),
        radial-gradient(140% 120% at 50% 120%, rgba(10,6,34,.55), rgba(0,0,0,0) 60%);
}

/* Greek-key column borders: repeating SVG tile strips down each edge */
.key-border {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 26px;
    opacity: .75;
    z-index: 1;
    pointer-events: none;
    background-repeat: repeat-y;
}

.key-border.left {
    left: clamp(10px, 1.8vw, 30px);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='36'%3E%3Cpath d='M4 5 H22 V23 H10 V11 H16 V17' fill='none' stroke='%23f4c24a' stroke-width='2.2'/%3E%3C/svg%3E");
}

.key-border.right {
    right: clamp(10px, 1.8vw, 30px);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='36'%3E%3Cpath d='M22 5 H4 V23 H16 V11 H10 V17' fill='none' stroke='%23f4c24a' stroke-width='2.2'/%3E%3C/svg%3E");
}

/* Content layer */
.page {
    position: relative;
    z-index: 3;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 clamp(52px, 8vw, 150px);
}

/* Nav */
nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 26px 0 8px;
}

.wordmark {
    display: inline-flex;
    align-items: baseline;
    gap: 9px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 27px;
    letter-spacing: .5px;
    text-decoration: none;
}

.wordmark .filotimo { color: #fff; font-weight: 700; }
.wordmark .creations { color: #f4c24a; font-weight: 500; }

.nav-actions { display: flex; gap: 12px; }

.pill {
    font-family: 'Mulish', sans-serif;
    font-size: 13.5px;
    letter-spacing: .4px;
    border-radius: 999px;
    padding: 9px 20px;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}

.pill.ghost {
    background: transparent;
    border: 1px solid rgba(255,255,255,.45);
    color: #fff;
    font-weight: 600;
}

.pill.ghost:hover {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.8);
}

.pill.gold {
    background: #f4c24a;
    border: 1px solid #f4c24a;
    color: #241a5e;
    font-weight: 700;
}

.pill.gold:hover { background: #ffd672; }

/* Header */
header {
    text-align: center;
    margin-top: clamp(10px, 3vh, 36px);
    animation: fadeup .8s ease both;
}

.eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 5px;
    color: #f4c24a;
    margin-bottom: 16px;
}

h1 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(36px, 5.4vw, 64px);
    line-height: 1.02;
    letter-spacing: .5px;
    max-width: 16ch;
    margin: 0 auto;
    text-wrap: balance;
}

.subhead {
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.6;
    color: rgba(255,255,255,.82);
    max-width: 52ch;
    margin: 18px auto 0;
    text-wrap: pretty;
}

/* Products */
.products {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: clamp(30px, 8vw, 120px);
    max-width: 1040px;
    margin: auto auto 0;
    padding-top: 28px;
    animation: fadeup 1s ease .15s both;
}

.product {
    width: clamp(200px, 21vw, 256px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* No backdrop-filter here even though the prototype specified blur(3px):
   re-blurring the backdrop every frame of the float animation causes visible
   stutter, and behind a 93%-opaque white card the blur is imperceptible.
   will-change keeps the continuously-animating cards on their own
   compositor layer so the float never re-rasterizes them. */
.card {
    width: 100%;
    background: rgba(255,255,255,.93);
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 16px;
    padding: 20px 20px 16px;
    text-align: center;
    box-shadow: 0 26px 50px -16px rgba(18,10,58,.6);
    color: #241a5e;
    will-change: transform;
    animation: floaty 6s ease-in-out infinite;
}

.card.card-a { cursor: pointer; }
.card.card-b { animation: floaty2 6.6s ease-in-out infinite; cursor: pointer; }

.card-icon {
    width: 58px;
    height: 58px;
    border-radius: 13px;
    box-shadow: 0 6px 16px rgba(18,10,58,.28);
    margin: 0 auto 12px;
    display: block;
}

.card-icon.storely-tile {
    background: linear-gradient(140deg, #f4c24a, #e79a4f);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 34px;
    color: #fff;
}

.kicker {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: #8a7bd0;
    margin-bottom: 6px;
}

.card-b .kicker { color: #c58a3e; }

.card h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 26px;
    color: #241a5e;
}

.card-reveal {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height .5s ease, opacity .4s ease;
}

.card:hover .card-reveal,
.card:focus-within .card-reveal {
    max-height: 260px;
    opacity: 1;
}

.card-desc {
    font-size: 13.5px;
    line-height: 1.5;
    color: #4a4370;
    margin: 10px 0 14px;
    text-wrap: pretty;
}

.cta {
    display: inline-block;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    margin-bottom: 6px;
    transition: background .2s ease, color .2s ease;
}

.cta.solid {
    background: #241a5e;
    color: #fff;
    font-size: 12.5px;
    padding: 10px 16px;
}

.cta.solid:hover { background: #3b2f8c; }

.cta.outline {
    background: transparent;
    border: 1px solid #241a5e;
    color: #241a5e;
    font-size: 13px;
    padding: 10px 22px;
}

.cta.outline:hover { background: #241a5e; color: #fff; }

.column-img {
    width: 82%;
    height: clamp(230px, 34vh, 400px);
    object-fit: contain;
    object-position: bottom;
    filter: drop-shadow(0 24px 30px rgba(18,10,58,.4));
    /* The drop-shadow sits under the floating cards' animation; keeping the
       filtered image on its own layer avoids re-running the filter per frame. */
    will-change: filter;
}

/* Footer */
footer {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border-top: 1px solid rgba(255,255,255,.18);
    padding: 18px 0 26px;
}

.footer-copy {
    font-size: 12.5px;
    color: rgba(255,255,255,.62);
}

.footer-links { display: flex; gap: 22px; }

.footer-links button,
.footer-links a {
    background: none;
    border: none;
    padding: 0;
    font-family: 'Mulish', sans-serif;
    font-size: 12.5px;
    color: rgba(255,255,255,.78);
    text-decoration: none;
    cursor: pointer;
    transition: color .2s ease;
}

.footer-links button:hover,
.footer-links a:hover { color: #f4c24a; }

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(14,8,40,.62);
    backdrop-filter: blur(4px);
    z-index: 20;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay.open { display: flex; }

.modal {
    background: #faf6ee;
    color: #241a5e;
    border-radius: 18px;
    border-top: 5px solid #f4c24a;
    padding: 40px 40px 34px;
    box-shadow: 0 40px 90px -20px rgba(10,6,34,.7);
    position: relative;
    animation: modalin .4s ease both;
}

.modal.about { width: min(560px, 100%); }
.modal.contact { width: min(520px, 100%); }

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #9a92b8;
    cursor: pointer;
}

.modal-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #c58a3e;
    margin-bottom: 10px;
}

.modal h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 34px;
    line-height: 1.05;
    margin-bottom: 16px;
}

.modal p {
    font-size: 15px;
    line-height: 1.65;
    color: #4a4370;
    text-wrap: pretty;
    margin-top: 12px;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #eadfca;
    border-radius: 12px;
    padding: 15px 18px;
    margin-top: 16px;
    color: #241a5e;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .2s ease;
}

.contact-row:hover { border-color: #f4c24a; }

.contact-row + .contact-row { margin-top: 12px; }

.modal .footnote {
    font-size: 12.5px;
    color: #9a92b8;
    margin-top: 14px;
}

/* Keyframes */
@keyframes fadeup {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
}

@keyframes floaty2 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@keyframes modalin {
    from { opacity: 0; transform: translateY(20px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Mobile: drop the decorative Greek-key strips and shrink the two product
   columns so both temples fit side by side within a phone's width. */
@media (max-width: 720px) {
    .key-border { display: none; }

    .page { padding: 0 18px; }

    .products {
        gap: 18px;
        margin-top: 40px;
        width: 100%;
    }

    .product { width: calc(50% - 9px); }

    .card { padding: 14px 12px 12px; }

    .card-icon { width: 46px; height: 46px; border-radius: 11px; }

    .card h2 { font-size: 21px; }

    .kicker { font-size: 9.5px; letter-spacing: 1.8px; }

    .card .card-reveal { max-height: none; opacity: 1; }

    .card-desc { font-size: 12px; margin: 8px 0 12px; }

    .cta.solid { font-size: 11.5px; padding: 9px 12px; }

    .cta.outline { font-size: 11.5px; padding: 9px 14px; }

    .column-img { height: clamp(140px, 22vh, 230px); }

    footer { justify-content: center; text-align: center; }
}
