/* =========================================================
   ROMA LOFTS — v47
   60s Italian / Industrial Bottling / Glass Lofts clean
   ========================================================= */

/* ---------- FONTS ---------- */
@font-face {
    font-family: "Boxing";
    src: url("fonts/Boxing-Regular.woff") format("woff");
    font-display: swap;
}
@font-face {
    font-family: "Big Shoulders Display";
    src: url("fonts/BigShoulders-Bold.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: "Big Shoulders Display";
    src: url("fonts/BigShoulders-Black.woff2") format("woff2");
    font-weight: 900;
    font-display: swap;
}
@font-face {
    font-family: "Lora";
    src: url("fonts/Lora-Regular.woff2") format("woff2");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Lora";
    src: url("fonts/Lora-Italic.woff2") format("woff2");
    font-weight: 400 700;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: "Led Display";
    src: url("fonts/TheLedDisplay.woff") format("woff");
    font-display: swap;
}

/* ---------- TOKENS ---------- */
:root {
    --white:        #ffffff;
    --parchment:    #efebe6;
    --stone:        #6e6259;
    --bark:         #7a5c58;
    --copper:       #d65a43;
    --indigo:       #252741;

    --bg:     var(--parchment);
    --text:   var(--indigo);
    --accent: var(--copper);
    --muted:  var(--stone);
    --line:   rgba(122,92,88,0.15);

    --font-body:    "Lora", Georgia, serif;
    --font-title:   "Boxing", Arial, sans-serif;
    --font-head:    "Big Shoulders Display", Arial, sans-serif;
    --font-sys:     -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
    --font-ticker:  "Led Display", "Courier New", monospace;

    --w: min(90vw, 480px);
    --header-h: 64px;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { display: block; width: 100%; }
a { color: inherit; text-decoration: none; }
a[data-link] {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}
a:focus-visible,
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- HEADER ---------- */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: var(--parchment);
    overflow: visible;
}

.header-top {
    height: var(--header-h);
    width: var(--w);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ---------- HEADER WORDMARK ---------- */
.header-wordmark {
    font-family: var(--font-title);
    font-size: 34px;
    font-weight: 400;
    line-height: 0.9;
    letter-spacing: -0.02em;
    color: var(--copper);
}
.header-wordmark span { color: var(--indigo); }

/* ---------- PORTAL BUTTON ---------- */
.portal-btn {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    color: var(--indigo);
    border: none;
    font-family: var(--font-head);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    padding: 8px 0;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.18s ease, color 0.18s ease;
}
.portal-btn:hover { opacity: 1; }
.portal-btn.is-open { color: var(--copper); opacity: 1; }
.portal-btn:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }

/* ---------- PORTAL FULL-WIDTH PANEL ---------- */
.portal-panel {
    max-height: 0;
    overflow: hidden;
    background: var(--parchment);
    transition: max-height 0.62s cubic-bezier(0.77, 0, 0.175, 1);
}
.portal-panel.open {
    max-height: 400px;
}

.portal-panel-body {
    max-width: 480px;
    margin: 0 auto;
    padding: 32px 0 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.portal-pennant {
    width: 80px;
    height: auto;
    margin-bottom: 20px;
}
.portal-eyebrow {
    margin: 0 0 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--bark);
}
.portal-desc {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--indigo);
    opacity: 0.65;
}
.portal-signin {
    display: inline-block;
    background: transparent;
    color: var(--indigo);
    font-family: var(--font-head);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    padding: 0;
    border: none;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.18s ease, color 0.18s ease;
}
.portal-signin:hover { opacity: 1; color: var(--copper); }

/* ---------- HEADER WAVE ---------- */
/* Organic wave — animates in when portal opens */
.header-wave {
    position: absolute;
    bottom: -59px;
    left: 0;
    width: 100%;
    height: 60px;
    pointer-events: none;
    display: block;
    transform: scaleY(0);
    transform-origin: top center;
    transition: transform 0.18s ease-in;
}
.site-header.is-open .header-wave {
    transform: scaleY(1);
    transition: transform 0.55s cubic-bezier(0.33, 1.5, 0.68, 1);
}

/* ---------- HERO ---------- */
.hero {
    position: relative;
    height: clamp(260px, 80vw, 440px);
    overflow: hidden;
}
.hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 72% 30%;
    transform: scale(1.18);
    transform-origin: 72% 30%;
}
/* Gradient overlay at bottom */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 40%,
        rgba(37,39,65,0.55) 100%
    );
}
.hero-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 0 0 44px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    width: var(--w);
    margin: 0 auto;
}
.hero-name {
    margin: 0;
    font-family: var(--font-title);
    font-size: clamp(52px, 9vw, 130px);
    font-weight: 400;
    line-height: 0.88;
    color: var(--white);
    letter-spacing: -0.02em;
}
.hero-name span { color: var(--copper); }
.hero-meta-right {
    text-align: right;
    padding-bottom: 8px;
}
.hero-meta-right p {
    margin: 0;
    font-family: var(--font-sys);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
    line-height: 1.8;
}

/* ---------- TICKER ---------- */
.ticker-band {
    position: relative;
    margin-top: -45px;
    z-index: 2;
    overflow: hidden;
    padding: 0;
    pointer-events: none;
}
.ticker-track {
    display: inline-flex;
    align-items: center;
    width: max-content;
    white-space: nowrap;
    color: var(--white);
    font-family: var(--font-ticker);
    font-size: 52px;
    line-height: 1;
    letter-spacing: 0.06em;
    will-change: transform;
}
.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 40px;
    padding: 0 20px;
}
.ticker-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--copper);
    flex-shrink: 0;
}

/* ---------- LAYOUT ---------- */
.container {
    width: var(--w);
    margin: 0 auto;
}

.section {
    padding: 56px 0;
    border-top: 1px solid var(--line);
}
#history { border-top: none; }
#history .history-layout { grid-template-columns: 1fr; }

/* ---------- HISTORY HEADLINE ---------- */
#history .kicker,
#section2 .kicker,
#section3 .kicker { color: var(--copper); }

#history .section-title {
    color: var(--indigo);
    line-height: 1.05;
    margin-bottom: 24px;
}
.hl {
    display: flex;
    justify-content: space-between;
    width: 100%;
    line-height: 1;
    gap: 0.35em;
}
.news-headline { letter-spacing: 0.02em; margin-bottom: 16px; }
.news-headline .hl:first-child  { font-size: clamp(18px, 6.5vw, 50px); }
.news-headline .hl:last-child   { font-size: clamp(18px, 6.5vw, 50px); }

/* ---------- HISTORY LAYOUT ---------- */
.history-layout {
    display: grid;
    grid-template-columns: 1fr 140px;
    gap: 20px;
    align-items: start;
    margin-top: 28px;
}
.history-layout.flipped {
    grid-template-columns: 140px 1fr;
}
.hl-single { font-size: clamp(36px, 10.5vw, 52px); }
#section2 .section-title { color: var(--indigo); line-height: 1.05; margin-bottom: 24px; }
#section2 .nearby-list { margin-top: 32px; }
#section3 { border-top: none; padding-top: 20px; }
#section2 .hl:first-child { font-size: clamp(18px, 6.5vw, 50px); }
#section2 .hl:last-child  { font-size: clamp(18px, 6.5vw, 50px); }
.history-clips {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.clipping {
    display: block;
    width: 100%;
    height: auto;
}
.body-copy.newspaper {
    font-size: 15px;
    line-height: 1.65;
    text-align: justify;
    margin-bottom: 14px;
    color: var(--indigo);
}
.body-copy.newspaper.muted { color: var(--indigo); }

.two-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: start;
}

.three-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
}

/* ---------- TYPOGRAPHY ---------- */
.kicker {
    display: block;
    margin: 0 0 10px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: none;
    color: var(--bark);
}

.section-title {
    margin: 0 0 32px;
    font-family: var(--font-head);
    font-size: clamp(26px, 3.2vw, 44px);
    font-weight: 900;
    font-style: normal;
    text-transform: uppercase;
    line-height: 1.05;
    color: var(--indigo);
}
h1.section-title { font-size: clamp(30px, 4vw, 54px); }

.body-copy {
    margin: 0 0 20px;
    font-size: 17px;
    line-height: 1.72;
    color: var(--text);
}
.body-copy:last-child { margin-bottom: 0; }
.body-copy.muted { color: var(--muted); }

/* ---------- META LINES (Glass Lofts style) ---------- */
.meta-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 18px;
}
.meta-stack + .meta-stack { margin-top: -4px; }
.meta-stack span {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
    font-family: var(--font-body);
}

/* ---------- FACT CARDS ---------- */
.fact-card {
    background: var(--white);
    padding: 32px 28px 30px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.fact-card:hover {
    transform: perspective(900px) translateY(-10px) rotateX(5deg) scale(1.02);
    box-shadow: 12px 14px 0 rgba(37,39,65,0.14);
}
.fact-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bark);
    margin-bottom: 10px;
}
.fact-value {
    display: block;
    font-family: var(--font-head);
    font-size: 26px;
    font-weight: 900;
    font-style: normal;
    text-transform: uppercase;
    color: var(--accent);
    line-height: 1.05;
    margin-bottom: 8px;
}
.fact-note {
    display: block;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.45;
}
.fact-note a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

/* ---------- NEARBY LIST ---------- */
.nearby-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.nearby-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    gap: 24px;
}
.nearby-item:first-child { border-top: 1px solid var(--line); }
.nearby-name { font-family: var(--font-head); font-weight: 700; font-size: 17px; color: var(--text); text-decoration: none; }
.nearby-name:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.nearby-dist  { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* ---------- HISTORY FEATURE ---------- */
.history-img {
    position: relative;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    height: clamp(260px, 80vw, 440px);
    overflow: hidden;
    margin-bottom: 0;
}
.history-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- TWO-BOX CONTACT ---------- */
.two-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.contact-box {
    background: transparent;
    padding: 24px 18px 28px;
}
.contact-box-title {
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 900;
    font-style: normal;
    text-transform: uppercase;
    color: var(--indigo);
    margin: 8px 0 10px;
    line-height: 1.05;
}
.contact-box-desc {
    font-size: 13px;
    color: var(--indigo);
    line-height: 1.55;
    margin: 0 0 18px;
}
.contact-box-link {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 700;
    font-style: normal;
    text-transform: none;
    letter-spacing: 0.02em;
    color: var(--indigo);
    line-height: 1.2;
    word-break: break-all;
    transition: color 0.15s;
}
.contact-box-link:hover { color: var(--accent); }

/* ---------- CONTACT ---------- */
.contact-address {
    display: inline-block;
    margin-top: 6px;
    font-family: var(--font-head);
    font-size: clamp(18px, 2.4vw, 30px);
    font-weight: 900;
    font-style: normal;
    text-transform: uppercase;
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 2px;
    transition: opacity 0.15s;
    line-height: 1.2;
}
.contact-address:hover { opacity: 0.72; }

/* ---------- FOOTER ---------- */
.site-footer {
    padding: 52px 0 44px;
}
.footer-inner {
    width: var(--w);
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}
.footer-wordmark {
    margin: 0;
    font-family: var(--font-title);
    font-size: 34px;
    font-weight: 400;
    line-height: 0.88;
    color: var(--accent);
    letter-spacing: -0.02em;
}
.footer-wordmark span { color: var(--indigo); }

/* ---------- RESPONSIVE ---------- */
@media (hover: none) {
    .fact-card:hover { transform: none; box-shadow: none; }
}
@media (max-width: 400px) {
    :root { --w: 92vw; }
}
