/* rgasz.com home — bento classroom portal */

:root {
    --cream: #f6f1e7;
    --ink: #17140f;
    --ink-soft: #5b5348;
    --line: rgba(23, 20, 15, 0.12);

    --tomato: #ff5b37;
    --cobalt: #2747f5;
    --lime: #c6f24e;
    --forest: #0f5c43;
    --violet: #8a5cf6;
    --sun: #ffc93c;

    --display: "Bricolage Grotesque", system-ui, sans-serif;
    --serif: "Instrument Serif", Georgia, serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --radius: 28px;
}

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

body {
    font-family: var(--display);
    background: var(--cream);
    color: var(--ink);
    line-height: 1.45;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

.shell {
    width: min(1200px, calc(100% - 2.5rem));
    margin: 0 auto;
}

.grain {
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    opacity: 0.35;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.08 0 0 0 0 0.05 0 0 0 0.18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Top bar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.logo {
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: -0.05em;
}

.logo span {
    color: var(--tomato);
}

.greeting {
    font-size: 0.92rem;
    color: var(--ink-soft);
    padding: 0.45rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
}

/* Hero */
.hero {
    position: relative;
    padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2rem, 5vw, 3.5rem);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 1.4rem;
    animation: rise 0.8s var(--ease) both;
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--tomato);
    box-shadow: 0 0 0 0 rgba(255, 91, 55, 0.6);
    animation: pulse 2.2s infinite;
}

@keyframes pulse {
    70% { box-shadow: 0 0 0 10px rgba(255, 91, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 91, 55, 0); }
}

.hero h1 {
    font-weight: 800;
    font-size: clamp(3.2rem, 9.5vw, 8.4rem);
    line-height: 0.88;
    letter-spacing: -0.055em;
    animation: rise 0.9s var(--ease) 0.08s both;
}

.hero h1 em {
    font-family: var(--serif);
    font-weight: 400;
    font-style: italic;
    letter-spacing: -0.02em;
    color: var(--tomato);
    position: relative;
    padding-right: 0.08em;
}

.hero h1 em::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0.1em;
    bottom: 0.06em;
    height: 0.12em;
    background: var(--lime);
    border-radius: 99px;
    z-index: -1;
    transform-origin: left;
    animation: underline 0.9s var(--ease) 0.7s both;
}

@keyframes underline {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.lede {
    max-width: 36ch;
    margin-top: 1.6rem;
    font-size: clamp(1.08rem, 1.8vw, 1.3rem);
    color: var(--ink-soft);
    animation: rise 0.9s var(--ease) 0.18s both;
}

.hero-doodle {
    position: absolute;
    right: 2%;
    top: 22%;
    width: clamp(120px, 17vw, 200px);
    animation: spin 26s linear infinite;
}

.hero-doodle text {
    font-family: var(--display);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    fill: var(--ink);
}

.hero-doodle circle {
    fill: var(--lime);
}

.hero-doodle path:not([id]) {
    fill: none;
    stroke: var(--ink);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes rise {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Bento grid */
.bento {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: minmax(250px, auto);
    gap: 1.1rem;
    perspective: 1200px;
}

.tile {
    --rx: 0deg;
    --ry: 0deg;
    --mx: 50%;
    --my: 50%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: var(--radius);
    overflow: hidden;
    isolation: isolate;
    transform: rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 10px 30px -18px rgba(23, 20, 15, 0.45);
    animation: rise 0.9s var(--ease) both;
}

.tile::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.28), transparent 45%);
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}

.tile:hover,
.tile:focus-visible {
    box-shadow: 0 30px 60px -30px rgba(23, 20, 15, 0.6);
    outline: none;
}

.tile:hover::before,
.tile:focus-visible::before {
    opacity: 1;
}

.tile:focus-visible {
    box-shadow: 0 0 0 4px var(--cream), 0 0 0 7px var(--ink);
}

.tile-dashboard { grid-column: span 4; grid-row: span 2; background: var(--cobalt); color: #fff; animation-delay: 0.25s; }
.tile-hex       { grid-column: span 2; grid-row: span 2; background: var(--tomato); color: #fff; animation-delay: 0.32s; }
.tile-science   { grid-column: span 2; background: var(--forest); color: #eaf7e3; animation-delay: 0.39s; }
.tile-camera    { grid-column: span 2; background: var(--violet); color: #fff; animation-delay: 0.46s; }
.tile-math      { grid-column: span 2; background: var(--sun); color: var(--ink); animation-delay: 0.53s; }

.tile-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tag {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(6px);
}

.tile-math .tag {
    background: rgba(23, 20, 15, 0.08);
    border-color: rgba(23, 20, 15, 0.15);
}

.go {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    font-size: 1.25rem;
    font-weight: 600;
    transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}

.tile-math .go {
    background: var(--ink);
    color: var(--sun);
}

.tile:hover .go {
    transform: rotate(45deg) scale(1.08);
    background: var(--lime);
    color: var(--ink);
}

.tile-copy h2 {
    font-weight: 800;
    font-size: clamp(1.7rem, 2.8vw, 2.3rem);
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 0.45rem;
}

.tile-dashboard .tile-copy h2 {
    font-size: clamp(2.6rem, 5.5vw, 4.6rem);
}

.tile-copy p {
    font-size: 1rem;
    opacity: 0.85;
    max-width: 38ch;
}

/* Art */
.art {
    flex: 1;
    min-height: 0;
    transition: transform 0.5s var(--ease);
}

.tile:hover .art {
    transform: translateY(-4px) scale(1.03);
}

.art-dashboard {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 3%;
    padding: 1rem 0 0;
    min-height: 200px;
    max-width: 540px;
}

.art-dashboard .bar {
    flex: 1;
    height: var(--h);
    border-radius: 14px 14px 6px 6px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.35));
    transform-origin: bottom;
    animation: grow 1.1s var(--ease) both;
}

.art-dashboard .bar:nth-child(4) {
    background: linear-gradient(180deg, var(--lime), rgba(198, 242, 78, 0.45));
}

.art-dashboard .bar:nth-child(1) { animation-delay: 0.5s; }
.art-dashboard .bar:nth-child(2) { animation-delay: 0.58s; }
.art-dashboard .bar:nth-child(3) { animation-delay: 0.66s; }
.art-dashboard .bar:nth-child(4) { animation-delay: 0.74s; }
.art-dashboard .bar:nth-child(5) { animation-delay: 0.82s; }
.art-dashboard .bar:nth-child(6) { animation-delay: 0.9s; }

@keyframes grow {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

.chip {
    position: absolute;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.55rem 0.95rem;
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.5);
    animation: bob 5s ease-in-out infinite;
}

.chip-a { top: 0; right: -4%; transform: rotate(4deg); }
.chip-b { top: 34%; left: 6%; transform: rotate(-5deg); animation-delay: -2.5s; }

@keyframes bob {
    50% { translate: 0 -8px; }
}

.art-hex {
    width: 100%;
    max-height: 260px;
}

.art-hex polygon {
    fill: rgba(255, 255, 255, 0.14);
    stroke: rgba(255, 255, 255, 0.55);
    stroke-width: 2;
    transition: fill 0.3s;
}

.art-hex polygon:nth-child(2) { fill: #fff; }
.art-hex polygon:nth-child(3) { fill: var(--ink); stroke: var(--ink); }
.art-hex polygon:nth-child(5) { fill: var(--lime); stroke: var(--lime); }

.tile-hex:hover .art-hex polygon:nth-child(1) { fill: var(--sun); }
.tile-hex:hover .art-hex polygon:nth-child(6) { fill: var(--ink); }

.art-hex text {
    font-family: var(--display);
    font-weight: 800;
    font-size: 20px;
    fill: var(--tomato);
}

.art-science,
.art-camera {
    align-self: flex-end;
    height: 120px;
    width: auto;
}

.tile-science .tile-copy {
    order: 1;
}

.art-science {
    order: 2;
    flex: 1 1 0;
    align-self: stretch;
    width: calc(100% + 3rem);
    height: auto;
    min-height: 110px;
    margin: 0 -1.5rem -1.5rem;
}

.art-science .sun { fill: var(--sun); }
.art-science .hill { fill: rgba(198, 242, 78, 0.85); }
.art-science .hill-back { fill: rgba(198, 242, 78, 0.35); }
.art-science .leaf { fill: #eaf7e3; }
.art-science .stem { fill: none; stroke: var(--forest); stroke-width: 2.5; }

.art-camera {
    position: absolute;
    right: 1.2rem;
    bottom: 1.2rem;
    height: 120px;
    z-index: -1;
}

.art-camera .ring {
    fill: rgba(255, 255, 255, 0.12);
    stroke: rgba(255, 255, 255, 0.6);
    stroke-width: 3;
}

.art-camera .aperture {
    fill: rgba(255, 255, 255, 0.85);
    transform-origin: 70px 70px;
    transition: transform 0.8s var(--ease);
}

.tile-camera:hover .aperture {
    transform: rotate(90deg) scale(0.8);
}

.art-camera .rec {
    fill: var(--tomato);
    animation: blink 1.4s steps(2) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.art-math {
    position: absolute;
    right: 1rem;
    bottom: 0.4rem;
    z-index: -1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    font-weight: 800;
    font-size: 3.2rem;
    line-height: 1;
    gap: 0.1rem 0.6rem;
    color: rgba(23, 20, 15, 0.85);
}

.art-math span {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    transition: transform 0.4s var(--ease);
}

.art-math span:nth-child(2),
.art-math span:nth-child(3) {
    color: var(--tomato);
}

.tile-math:hover .art-math span:nth-child(1) { transform: rotate(90deg); }
.tile-math:hover .art-math span:nth-child(2) { transform: rotate(-90deg); }
.tile-math:hover .art-math span:nth-child(3) { transform: translateY(-6px); }
.tile-math:hover .art-math span:nth-child(4) { transform: scaleX(1.3); }

.tile-demo {
    grid-column: span 6;
    background: var(--ink);
    color: var(--cream);
    animation-delay: 0.6s;
}

.tile-demo .tag {
    background: rgba(246, 241, 231, 0.08);
    border-color: rgba(246, 241, 231, 0.2);
}

.tile-demo .go {
    background: var(--lime);
}

.tile-demo:hover .go {
    background: var(--tomato);
    color: #fff;
}

.tile-demo .tile-copy h2 {
    font-size: clamp(2.2rem, 4.5vw, 3.6rem);
}

.demo-body {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    align-items: end;
    gap: 1.5rem 2.5rem;
}

.art-demo {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 0.5rem 0 0.2rem;
}

.frac-row {
    display: grid;
    grid-template-columns: 3.2rem 1fr;
    align-items: center;
    gap: 0.9rem;
}

.frac-label {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    color: rgba(246, 241, 231, 0.75);
}

.frac-bar {
    position: relative;
    height: 34px;
    border-radius: 10px;
    background: rgba(246, 241, 231, 0.1);
    border: 1.5px solid rgba(246, 241, 231, 0.35);
    overflow: hidden;
}

.frac-bar i {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--w);
    transform-origin: left;
    animation: fill-in 1s var(--ease) both;
}

.frac-row:nth-child(1) i { animation-delay: 0.8s; }
.frac-row:nth-child(2) i { animation-delay: 0.95s; }
.frac-row:nth-child(3) i { animation-delay: 1.1s; }

.fill-tomato { background: var(--tomato); }
.fill-lime { background: var(--lime); }
.fill-sun { background: var(--sun); }

.frac-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, transparent calc(50% - 1px), rgba(246, 241, 231, 0.55) calc(50% - 1px), rgba(246, 241, 231, 0.55) calc(50% + 1px), transparent calc(50% + 1px));
}

.frac-bar.split-4::after {
    background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1.5px), rgba(23, 20, 15, 0.6) calc(25% - 1.5px) 25%);
}

.frac-bar.split-8::after {
    background: repeating-linear-gradient(90deg, transparent 0 calc(12.5% - 1.5px), rgba(23, 20, 15, 0.6) calc(12.5% - 1.5px) 12.5%);
}

.frac-note {
    position: absolute;
    left: calc(3.2rem + 0.9rem + 50%);
    top: -1.6rem;
    transform: translateX(-50%) rotate(-4deg);
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.35rem;
    color: var(--lime);
    white-space: nowrap;
}

@keyframes fill-in {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.tile-demo:hover .frac-bar i {
    filter: brightness(1.08);
}

.tile-camera .tile-copy,
.tile-math .tile-copy {
    max-width: 62%;
}

/* Ohio Bike Paths */
.tile-bike {
    grid-column: 1 / -1;
    background: #b9e4d5;
    color: #123e36;
    animation-delay: 0.67s;
}
.tile-bike .tag { background: rgba(255, 255, 255, 0.3); border-color: rgba(18, 62, 54, 0.2); }
.tile-bike .go { background: #123e36; color: #b9e4d5; }
.bike-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 1.5rem 2.5rem;
}
.tile-bike .tile-copy h2 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); }
.tile-bike .tile-copy p { max-width: 44ch; }
.art-bike { width: 100%; height: auto; max-height: 190px; }
.bike-trail { fill: none; stroke: #4b9582; stroke-width: 3; stroke-dasharray: 5 9; stroke-linecap: round; }
.bike-stop { fill: #123e36; stroke: #b9e4d5; stroke-width: 3; }
.bike-frame { fill: none; stroke: #123e36; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 620px) {
    .bike-body { grid-template-columns: 1fr; }
    .art-bike { max-height: 150px; }
}

/* Marquee */
.marquee {
    margin: 3.5rem 0 0;
    padding: 1.2rem 0;
    border-block: 1.5px solid var(--ink);
    overflow: hidden;
    transform: rotate(-1.2deg);
    background: var(--lime);
}

.marquee-track {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: max-content;
    animation: scroll 30s linear infinite;
    font-weight: 800;
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.marquee-track i {
    font-style: normal;
    color: var(--tomato);
}

@keyframes scroll {
    to { transform: translateX(-50%); }
}

/* Footer */
.site-footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 3.5rem 0 2.5rem;
    font-size: 0.92rem;
    color: var(--ink-soft);
}

.site-footer a {
    font-weight: 600;
    color: var(--ink);
    border-bottom: 1.5px solid var(--tomato);
}

/* Responsive */
@media (max-width: 960px) {
    .bento { grid-template-columns: repeat(2, 1fr); }
    .tile-dashboard { grid-column: span 2; grid-row: span 1; }
    .tile-hex { grid-column: span 1; grid-row: span 1; }
    .tile-science,
    .tile-camera,
    .tile-math { grid-column: span 1; }
    .tile-demo { grid-column: span 2; }
    .hero-doodle { top: 8%; opacity: 0.9; }
}

@media (max-width: 620px) {
    .shell { width: calc(100% - 1.5rem); }
    .bento { grid-template-columns: 1fr; }
    .tile-dashboard,
    .tile-hex,
    .tile-science,
    .tile-camera,
    .tile-math,
    .tile-demo { grid-column: span 1; }
    .demo-body { grid-template-columns: 1fr; }
    .art-demo { padding-top: 2rem; }
    .greeting { display: none; }
    .hero-doodle { width: 96px; top: 0; right: 0; }
    .art-dashboard { min-height: 150px; }
    .chip-a { right: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
