/* ===== TACOM =====
   Editorial layout: big type, gradient hero card, lots of air */
:root {
    --ink: #262626;
    --dark: #282828;
    --soft: #6f7476;
    --line: #d9d9d9;
    --paper: #ffffff;
    --grey: #f7f7f7;
    --coral: #e63f55;
    --orange: #ff6a2b;
    --peach: #ffb594;
    --lilac: #968cd7;
    --lilac-light: #d7d1ff;
    --teal: #67b2c0;
    --sky: #b9e4ec;
    --radius: 22px;
    --font: "Montserrat", system-ui, sans-serif;
}

html { scroll-behavior: smooth; }
body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-weight: 400;
    font-size: 1.05rem;
    line-height: 1.6;
    overflow-x: hidden;
}
a { color: inherit; }
em { font-style: italic; font-weight: 300; }
::selection { background: var(--lilac-light); }

.container-narrow { max-width: 920px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

.tag-label {
    color: var(--lilac);
    font-size: .95rem;
    letter-spacing: .02em;
    margin-bottom: 1.5rem;
}

/* ===== Header ===== */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 10; }
.brand-box {
    position: fixed; top: 44px; left: 7%; z-index: 20;
    transition: top .35s ease, padding .35s ease, border-radius .35s ease, font-size .35s ease;
    display: flex; flex-direction: column;
    background: var(--paper); padding: 8px 10px 10px; border-radius: 0 0 10px 10px;
    font-size: 1.15rem; line-height: 1.05; text-decoration: none; color: var(--ink);
    letter-spacing: -.01em;
}
/* After scrolling: the label rises and aligns with the menu */
.is-scrolled .brand-box { top: 0; padding: 12px 9px 8px; font-size: .85rem; border-radius: 0 0 10px 10px; }

.nav-tab {
    position: fixed; top: 0; right: 9%;
    display: flex; gap: 2.6rem;
    background: var(--paper); padding: 2rem 3.2rem 1.1rem;
    border-radius: 0 0 28px 28px;
    z-index: 20;
}
.nav-tab a {
    text-decoration: none; text-transform: uppercase; font-weight: 500; font-size: 1rem;
    position: relative;
}
.nav-tab a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px;
    background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.nav-tab a:hover::after { transform: scaleX(1); }

/* ===== Hero ===== */
.hero-wrap { padding: 44px 44px 0; }
.hero-card {
    position: relative; overflow: hidden;
    min-height: min(calc(100vh - 88px), 860px);
    border-radius: var(--radius);
    display: flex; align-items: center; gap: 4.5rem;
    padding: 8rem 7% 6rem 9%;
}
.hero-logo {
    position: relative; flex: 0 0 auto;
    width: clamp(110px, 12vw, 180px); height: auto;
    animation: logoIn .8s cubic-bezier(.3, 1.4, .5, 1) both, logoFloat 6s ease-in-out 1s infinite;
}
@keyframes logoIn {
    from { opacity: 0; transform: scale(.6) rotate(-8deg); }
    to   { opacity: 1; transform: none; }
}
@keyframes logoFloat {
    0%, 100% { transform: translateY(0) rotate(0); }
    50%      { transform: translateY(-8px) rotate(-2deg); }
}
.hero-gradient {
    position: absolute; inset: -6%;
    background: url("../img/hero-bg.jpg") center / cover no-repeat;
    animation: drift 24s ease-in-out infinite alternate;
}
@keyframes drift {
    0%   { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.08) translate(-2%, 1.5%); }
}
.hero-title {
    position: relative; margin: 0;
    font-weight: 500;
    font-size: clamp(2.6rem, 6.4vw, 6rem);
    line-height: .86;
    letter-spacing: -.045em;
}
/* Each line: colourful gradient that slowly flows + staggered entrance */
.hero-title span {
    display: block;
    padding-bottom: .04em; /* keeps descenders inside the clipped gradient */
    background: linear-gradient(100deg, var(--coral), var(--orange), #c2335f, #5b2bd9, var(--teal), #5b2bd9, #c2335f, var(--orange), var(--coral));
    background-size: 200% 100%;
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
    animation:
        heroLineIn .9s cubic-bezier(.2, .7, .2, 1) both,
        heroFlow 14s linear infinite;
}
.hero-title span:nth-child(1) { --p: 0%;    animation-delay: .15s, 0s; }
.hero-title span:nth-child(2) { --p: -25%;  animation-delay: .3s, 0s; }
.hero-title span:nth-child(3) { --p: -50%;  animation-delay: .45s, 0s; }
.hero-title span:nth-child(4) { --p: -75%;  animation-delay: .6s, 0s; }
@keyframes heroLineIn {
    from { opacity: 0; transform: translateY(45%); filter: blur(6px); }
    to   { opacity: 1; transform: none; filter: none; }
}
@keyframes heroFlow {
    from { background-position: var(--p) 0; }
    to   { background-position: calc(var(--p) - 200%) 0; }
}
.hero-title .thin { font-weight: 300; font-style: italic; }

/* ===== Intro ===== */
.intro { padding: 10rem 0 14rem; }
.intro-text {
    font-weight: 400; font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    line-height: 1.15; letter-spacing: -.02em; max-width: 640px; margin: 0;
}

/* ===== Manifesto ===== */
.manifesto { background: var(--grey); padding: 9rem 0; }
.manifesto p {
    font-size: clamp(1.15rem, 1.7vw, 1.45rem); line-height: 1.3; letter-spacing: -.01em;
    max-width: 640px; margin-bottom: 1.6rem;
}
.manifesto p:last-child { margin-bottom: 0; }
/* Key phrases: same colourful gradient as the hero title */
.manifesto em {
    font-weight: 700;
    background: linear-gradient(100deg, var(--coral) 0%, var(--orange) 30%, #c2335f 60%, #5b2bd9 85%, var(--teal) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* ===== Definition (dark) ===== */
.definition { background: var(--dark); color: #fff; padding: 7rem 0 10rem; }
.def-head { border-bottom: 1px solid #6a6a6a; padding-bottom: .9rem; margin-bottom: 3rem; font-size: 1rem; }
.def-body {
    margin: 0 0 0 15%;
    font-size: clamp(1.7rem, 3.2vw, 2.6rem); line-height: 1.1; letter-spacing: -.02em;
    background: linear-gradient(100deg, var(--lilac-light) 0%, var(--peach) 45%, var(--sky) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ===== Studio vs agency vs freelancer (dark) ===== */
.compare { background: var(--dark); color: #fff; padding: 7rem 0 8rem; }
.compare .def-head { color: #fff; }
.compare-title { color: #fff; font-weight: 400; font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.05; letter-spacing: -.03em; margin: 0 0 1.5rem; }
.compare-sub { color: #a9a9a9; font-size: 1.1rem; max-width: 380px; }
.compare-item { display: flex; gap: 1.5rem; padding: 2rem 0; border-top: 1px solid #4a4a4a; }
.compare-item:first-child { border-top: 0; padding-top: 0; }
.compare-num { font-size: .85rem; color: #8a8a8a; padding-top: .4rem; min-width: 1.6rem; }
.compare-item h3 { color: #fff; font-weight: 400; font-size: clamp(1.4rem, 2.2vw, 1.9rem); letter-spacing: -.02em; margin: 0 0 .7rem; }
.compare-item p { color: #a9a9a9; margin: 0; max-width: 560px; }
.compare-item.is-us p { color: #e4e4e4; }
.compare-item.is-us .compare-num { color: var(--peach); }
.gradient-text {
    background: linear-gradient(100deg, var(--lilac-light) 0%, var(--peach) 50%, var(--sky) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent !important;
}

/* ===== Projects ===== */
.projects { padding: 0 64px; }
.projects-inner { background: var(--grey); border-radius: 0 0 var(--radius) var(--radius); padding: 6rem 7% 4rem; }
.big-heading {
    font-weight: 400; font-size: clamp(3rem, 7vw, 5.6rem);
    line-height: .9; letter-spacing: -.04em; margin: 0 0 6rem;
}
.project {
    display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: 2rem;
    padding: 2.5rem 0; border-top: 1px solid var(--line);
    align-items: start;
}
.project-info {
    background: var(--paper); border-radius: 14px; padding: 1.4rem 1.4rem 1.6rem;
    max-width: 320px;
}
.year { font-size: .82rem; color: var(--soft); }
.project-info h3 { font-size: 1.25rem; font-weight: 500; text-transform: uppercase; margin: 0 0 .4rem; letter-spacing: -.01em; }
.project-info p { font-size: .88rem; color: var(--soft); line-height: 1.35; margin: 0 0 1rem; }
.pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.pills span {
    font-size: .62rem; text-transform: uppercase; letter-spacing: .04em;
    border: 1px solid var(--line); border-radius: 50px; padding: .3rem .7rem;
}
.project-link {
    display: inline-block; margin-top: 1.1rem; font-size: .85rem; text-decoration: none;
    border-bottom: 1px solid var(--ink); transition: color .2s, border-color .2s;
}
.project-link:hover { color: var(--coral); border-color: var(--coral); }
.project-media {
    aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden;
    background-size: cover; background-position: center;
    transition: transform .6s ease;
}
/* Portrait book covers: show the whole cover on a soft background */
.project-media.is-cover { background-color: #fbe9df; background-size: auto 86%; background-repeat: no-repeat; }
.project:hover .project-media { transform: scale(.985); }
.ph { display: flex; align-items: center; justify-content: center; color: rgba(38, 38, 38, .45); font-size: .9rem; }
.ph-a { background: linear-gradient(135deg, var(--lilac-light), var(--sky)); }
.ph-b { background: linear-gradient(135deg, var(--peach), #ffe3d6); }
.ph-c { background: linear-gradient(135deg, var(--sky), #f2f9fa); }

/* ===== Process ===== */
.process { padding: 10rem 0 8rem; }
.process-title {
    font-weight: 400; font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.05; letter-spacing: -.03em; margin: 0;
}
.pillar { padding-top: 1.5rem; border-top: 1px solid var(--ink); }
.pillar-icon { display: inline-block; width: 40px; height: 40px; color: var(--lilac); }
.pillar h3 { font-size: 1.6rem; font-weight: 300; margin: 1.2rem 0 .8rem; }
.pillar p { color: var(--soft); font-size: .98rem; }
.pillar ul { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.pillar li { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.process-note { margin-top: 5rem; font-size: 1.3rem; max-width: 640px; }
.process .pillar h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin-bottom: 0; }
.cta-links { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 2rem; font-size: 1.3rem; }
.cta-links a { text-decoration: none; border-bottom: 1px solid var(--ink); }
.cta-links a:hover { color: var(--coral); border-color: var(--coral); }

/* ===== CTA ===== */
.cta { padding: 8rem 0 9rem; border-top: 1px solid var(--line); }
.cta-title { font-size: clamp(1.9rem, 4.2vw, 3.6rem); font-weight: 400; letter-spacing: -.03em; line-height: 1.1; margin: 0; }
.cta-title em { font-weight: 300; }
.cta-text { font-size: 1.3rem; max-width: 600px; margin: 0; }
.cta-text a { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.cta-text a:hover { color: var(--coral); }

/* ===== Banner ===== */
.banner { background: var(--dark); color: #fff; overflow: hidden; white-space: nowrap; padding: 3rem 0; }
.banner-track { display: inline-flex; align-items: center; gap: 3rem; animation: marquee 32s linear infinite; }
.banner-track span { font-size: clamp(1.2rem, 2.4vw, 2rem); letter-spacing: -.01em; line-height: 1; }
.banner-track .banner-sub {
    font-size: clamp(1.8rem, 4.5vw, 4rem); letter-spacing: -.01em; padding-right: 3rem;
    background: linear-gradient(90deg, var(--peach), var(--lilac-light));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===== Footer ===== */
.site-footer { background: var(--dark); color: #bdbdbd; padding: 4rem 0 2rem; border-top: 1px solid #3a3a3a; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--peach); }
.foot-brand { color: #fff; font-size: 1.4rem; line-height: 1.05; }
.foot-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #8a8a8a; margin-bottom: .5rem; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid #3a3a3a; font-size: .85rem; }

.legal-line { line-height: 1.7; }
.legal-line .sep { margin: 0 .35rem; color: #6a6a6a; }
.legal-line a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ===== Legal pages (privacy.html) ===== */
.legal-header { padding: 2rem 0; border-bottom: 1px solid var(--line); }
.legal-header .container-narrow { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.legal-brand { text-decoration: none; display: flex; align-items: center; gap: .7rem; font-weight: 500; letter-spacing: .02em; }
.legal-brand img { width: 40px; height: auto; }
.legal-back { text-decoration: none; font-size: .95rem; border-bottom: 1px solid var(--ink); }
.legal-back:hover { color: var(--coral); border-color: var(--coral); }
.legal { padding: 5rem 0 7rem; }
.legal h1 { font-weight: 400; font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.03em; line-height: 1.05; margin: 0 0 .8rem; }
.legal .updated { color: var(--soft); font-size: .9rem; margin-bottom: 3.5rem; }
.legal h2 { font-size: 1.25rem; font-weight: 600; margin: 3rem 0 .8rem; }
.legal p, .legal li { max-width: 720px; color: #3a3a3a; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: .4rem; }
.legal a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.legal a:hover { color: var(--coral); }
.placeholder { background: #fff3b0; color: #262626; padding: 0 .25em; border-radius: 3px; }

/* ===== Reveal on scroll ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .hero-wrap { padding: 16px 16px 0; }
    .hero-card { min-height: min(82vh, 720px); padding: 7rem 8% 4rem; }
    .brand-box { top: 16px; left: 32px; font-size: 1rem; }
    .is-scrolled .brand-box { top: 0; font-size: .78rem; }
    .nav-tab { right: 16px; gap: 1.3rem; padding: 1.2rem 1.4rem .8rem; border-radius: 0 0 20px 20px; }
    .nav-tab a { font-size: .85rem; }
    .projects { padding-left: 16px; padding-right: 16px; }
    .intro { padding: 6rem 0 8rem; }
    .manifesto { padding: 6rem 0; }
    .def-body { margin-left: 0; }
    .projects-inner { padding: 4rem 6% 2rem; }
    .big-heading { margin-bottom: 3rem; }
    .project { grid-template-columns: 1fr; }
    .project-info { max-width: none; order: 2; }
    .project-media { order: 1; }
    .process { padding: 6rem 0; }
}
@media (max-width: 575px) {
    /* Label on the left, menu on the right, both smaller */
    .brand-box { top: 16px; left: 16px; font-size: .78rem; padding: 6px 7px 7px; }
    .is-scrolled .brand-box { top: 0; font-size: .7rem; padding: 10px 7px 6px; }
    .nav-tab { right: 16px; gap: .9rem; padding: 1rem 1rem .7rem; border-radius: 0 0 16px 16px; }
    .nav-tab a { font-size: .75rem; }
    .hero-card { padding-top: 6.5rem; }
    .hero-title { font-size: clamp(1.7rem, 8.4vw, 2.4rem); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero-gradient, .banner-track, .hero-logo, .hero-title span { animation: none; }
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* Hero logo: above the title on mobile */
@media (max-width: 767px) {
    .hero-card { flex-direction: column; align-items: center; justify-content: center; gap: 1.75rem; text-align: center; }
    .hero-logo { width: 96px; }
}

/* Scrolled: label and menu tab share the same height */
:root { --tab-h: 62px; }
.is-scrolled .brand-box,
.is-scrolled .nav-tab { height: var(--tab-h); }
.is-scrolled .brand-box { justify-content: flex-end; padding-top: 0; padding-bottom: 9px; }
.is-scrolled .nav-tab { align-items: flex-end; padding-top: 0; padding-bottom: 1.15rem; transition: height .35s ease, padding .35s ease; }
@media (max-width: 991px) { :root { --tab-h: 54px; } .is-scrolled .nav-tab { padding-bottom: .95rem; } }
@media (max-width: 575px) { :root { --tab-h: 46px; } .is-scrolled .nav-tab { padding-bottom: .8rem; } .is-scrolled .brand-box { padding-bottom: 6px; } }

/* Scrolled: soft shadow so the tabs stay visible on white sections */
.brand-box, .nav-tab { transition: top .35s ease, padding .35s ease, border-radius .35s ease, font-size .35s ease, height .35s ease, box-shadow .35s ease; }
.is-scrolled .brand-box,
.is-scrolled .nav-tab { box-shadow: 0 8px 24px rgba(40, 40, 40, .09), 0 1px 3px rgba(40, 40, 40, .06); }
