/* COLORS  */
:root {
    --cream: #fff9df;
    --dark: #222725;
    --yellow: #ffda70;
    --pink: #ff90d3;
    --blue: #007fa8;
    --magenta: #a32460;
    --muted: #655e50;
    --gutter: 4vw;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--cream);
    color: var(--dark);
    font-family: Helvetica, Arial, sans-serif;
    overflow-x: hidden;
}
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--dark); outline-offset: 4px; }
img { display: block; max-width: 100%; }

/* HEADER */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px var(--gutter);
    background: var(--cream);
}
.logo img { width: 130px; height: auto; }
.site-header nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 44px); }
.site-header nav a {
    font-size: clamp(15px, 1.6vw, 22px);
    text-decoration: none;
    transition: color 0.2s;
}
.site-header nav a:hover { color: var(--magenta); }

/*  BUTTONS */
.site-header .nav-button,
.pill-button {
    white-space: nowrap;
    display: inline-block;
    padding: 12px 26px;
    border-radius: 40px;
    background: var(--dark);
    color: var(--cream);
    text-decoration: none;
    transition: color 0.2s, transform 0.2s;
}
.site-header .nav-button:hover,
.pill-button:hover { color: var(--yellow); }
.pill-button:hover { transform: translateY(-2px); }
.pill-button { font-size: clamp(17px, 1.6vw, 22px); }

/* INTRO */
.hero {
    display: grid;
    grid-template-columns: 7fr 5fr;
    align-items: center;
    gap: var(--gutter);
    min-height: calc(100vh - 160px);
    padding: 6vh var(--gutter) 10vh;
}
/* Page heading */
.hero h1 {
    margin: 0 0 28px;
    font-size: clamp(52px, 7vw, 120px);
    line-height: 0.9;
    letter-spacing: -0.04em;
    font-weight: 700;
}
.scroll-link {
    font-size: 18px;
    font-style: italic;
    text-underline-offset: 5px;
}
.scroll-link:hover { color: var(--magenta); }

/* SHAPE LINKS (OVERLAPPING): FLOWER = ABOUT, OVAL = WORK, BLUE = START A PROJECT */
.hero-shapes {
    position: relative;
    width: 100%;
    max-width: 520px;
    aspect-ratio: 100 / 108;
    justify-self: center;
    container-type: inline-size;
}
.hero-shapes a {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    background: center / contain no-repeat;
    font-size: 5.4cqw;
    font-style: italic;
    line-height: 1.15;
    text-align: center;
    text-underline-offset: 4px;
    animation: float 6s ease-in-out infinite;
    transition: transform 0.35s ease;
}
.hero-shapes .hero-oval {
    left: 36%; top: -4%; width: 57%; height: 52.8%; z-index: 1;
    background-image: url('images/shape-right.png');
}
.hero-shapes .hero-slant {
    left: 15%; top: 50%; width: 77%; height: 47.9%; z-index: 2;
    background-image: url('images/shape-middle.png');
    color: var(--cream);
    animation-delay: -4s;
}
.hero-shapes .hero-flower {
    left: 0; top: 18%; width: 58%; height: 53.7%; z-index: 3;
    background-image: url('images/shape-left.png');
    animation-delay: -2s;
}
/* Nudge text toward the visible part of each shape */
.hero-oval span { translate: 8% -10%; }
.hero-slant span { translate: 6% 6%; }
.hero-shapes a:hover, .hero-shapes a:focus-visible { transform: scale(1.06); z-index: 4; }
.hero-oval:hover span, .hero-flower:hover span { color: #7c2453; }
.hero-slant:hover span { color: var(--yellow); }
@keyframes float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -12px; }
}

/* MOVING BAR */
.shapead { height: 64px; background: var(--dark); color: var(--yellow); overflow: hidden; }
.bar-track { display: flex; width: max-content; animation: scroll-left 22s linear infinite; }
.bar-track span {
    flex-shrink: 0;
    padding-right: 0.5em;
    white-space: nowrap;
    font-size: clamp(18px, 2vw, 28px);
    line-height: 64px;
}
@keyframes scroll-left {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* FEATURED PROJECTS */
.featured { padding: 12vh var(--gutter) 10vh; scroll-margin-top: 80px; }
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 6vh;
}
.section-head h2 {
    margin: 0;
    font-size: clamp(36px, 4.5vw, 72px);
    line-height: 0.95;
    letter-spacing: -0.04em;
}
.section-head a { font-size: 18px; text-underline-offset: 5px; }
.section-head a:hover { color: var(--magenta); }

.featured-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8vh var(--gutter);
}

.project-card:nth-child(even) { margin-top: 14vh; }
.project-card { display: block; text-decoration: none; }
.card-image {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--cream);
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.project-card:hover .card-image img { transform: scale(1.04); }
.card-info {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 16px;
    margin-top: 18px;
}
.card-number {
    grid-row: 1 / 3;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--muted);
    padding-top: 6px;
}
.card-info h3 {
    margin: 0;
    font-size: clamp(22px, 2vw, 30px);
    letter-spacing: -0.02em;
}
.project-card:hover h3 { text-decoration: underline; text-underline-offset: 5px; }
.card-info p { margin: 4px 0 0; font-size: 17px; color: var(--muted); }
.all-work { display: table; margin: 12vh auto 0; }

/* CALL TO ACTION */
.cta {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: var(--gutter);
    margin: 0 var(--gutter) 10vh;
    padding: clamp(36px, 6vw, 90px);
    border-radius: 32px;
    background: #fff1b8;
}
.cta h2 {
    margin: 0 0 20px;
    font-size: clamp(44px, 6vw, 100px);
    line-height: 0.9;
    letter-spacing: -0.04em;
}
.cta p { max-width: 30ch; margin: 0 0 30px; font-size: clamp(18px, 1.6vw, 24px); line-height: 1.35; }

/* FOOTER */
.site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 28px var(--gutter);
    border-top: 2px solid var(--dark);
    font-size: 15px;
}
.site-footer p { margin: 0; }
.site-footer nav { display: flex; gap: 22px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--magenta); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero-shapes a, .bar-track { animation: none; }
    .card-image img, .pill-button, .hero-shapes a { transition: none; }
}

/* TABLET */
@media (max-width: 900px) {
    :root { --gutter: 6vw; }
    .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 5vh; gap: 7vh; }
    .hero h1 { font-size: 11vw; }
    .hero-shapes { max-width: 460px; }
    .featured { padding-top: 9vh; }
    .featured-grid { grid-template-columns: 1fr; gap: 56px; }
    .project-card:nth-child(even) { margin-top: 0; }
}

/* PHONE */
@media (max-width: 600px) {
    :root { --gutter: 16px; }
    .site-header { padding: 14px var(--gutter); gap: 12px; }
    .logo img { width: 84px; }
    .site-header nav { gap: 12px; }
    .site-header nav a { font-size: 14px; }
    .site-header .nav-button { padding: 8px 12px; }
    .hero { padding-top: 32px; padding-bottom: 56px; }
    .hero h1 { font-size: 12.5vw; }
    .hero-shapes { max-width: 340px; }
    .shapead { height: 52px; }
    .bar-track span { font-size: 18px; line-height: 52px; }
    .section-head a { display: none; }
    .cta { margin-bottom: 56px; border-radius: 24px; }
    .all-work { margin-top: 48px; }
    .site-footer { flex-direction: column; align-items: flex-start; }
}

/* VERY SMALL PHONES */
@media (max-width: 380px) {
    .logo img { width: 70px; }
    .site-header nav { gap: 8px; }
    .site-header nav a { font-size: 13px; }
    .site-header .nav-button { padding: 7px 10px; }
}

/* NO STRANDED WORDS: the browser balances headings and avoids a single word alone on a paragraph's last line */
h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
