/* Hammy Studio: Ricardo's starting board. Fredoka for headings, DM Sans for text (both OFL, see fonts/). */

@font-face {
  font-family: "Fredoka";
  src: url("/fonts/fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  /* pastel accents, the same family as Song Lab */
  --pink: #ffb3e6;
  --yellow: #ffe780;
  --mint: #83ffc1;
  --cyan: #a1e9ff;
  --periwinkle: #a4a4f4;
  --violet: #5757c4;

  --bg: #f7f5ff;
  --surface: #ffffff;
  --text: #1a1824;
  --text-2: #55516a;
  --line: rgba(26, 24, 36, 0.09);
  --shadow: 0 1px 2px rgba(26, 24, 36, 0.06), 0 8px 24px rgba(87, 87, 196, 0.08);
  --shadow-lift: 0 2px 4px rgba(26, 24, 36, 0.06), 0 18px 40px rgba(87, 87, 196, 0.18);
  --chip: #efecff;
  --chip-text: #4b4ab0;
  --btn: #1a1824;
  --btn-text: #ffffff;
  --focus: #5757c4;

  --radius: 22px;
  --font-display: "Fredoka", ui-rounded, system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121018;
    --surface: #1c1a26;
    --text: #f4f2fb;
    --text-2: #aaa6bf;
    --line: rgba(255, 255, 255, 0.08);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.3), 0 18px 40px rgba(0, 0, 0, 0.45);
    --chip: #2a2740;
    --chip-text: #c9c6ff;
    --btn: #f4f2fb;
    --btn-text: #121018;
    --focus: #a4a4f4;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  /* soft pastel glow behind the hero */
  background-image:
    radial-gradient(40rem 26rem at 8% -6%, color-mix(in srgb, var(--pink) 34%, transparent), transparent 70%),
    radial-gradient(36rem 24rem at 92% 4%, color-mix(in srgb, var(--cyan) 38%, transparent), transparent 70%),
    radial-gradient(30rem 20rem at 55% 18%, color-mix(in srgb, var(--yellow) 22%, transparent), transparent 70%);
  background-repeat: no-repeat;
}

@media (prefers-color-scheme: dark) {
  body {
    background-image:
      radial-gradient(40rem 26rem at 8% -6%, color-mix(in srgb, var(--violet) 30%, transparent), transparent 70%),
      radial-gradient(36rem 24rem at 92% 4%, color-mix(in srgb, #2b6b80 30%, transparent), transparent 70%);
  }
}

img {
  display: block;
  max-width: 100%;
  height: auto; /* the width/height attributes only reserve the shape; CSS sizes the picture */
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 8px;
}

h1,
h2,
.card-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--btn);
  color: var(--btn-text);
  z-index: 10;
}

.skip:focus {
  top: 12px;
}

/* ---------- top bar ---------- */

.topbar,
main,
.footer {
  width: min(1160px, 100% - 32px);
  margin-inline: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 600 22px/1 var(--font-display);
  text-decoration: none;
}

.brand-sub {
  color: var(--text-2);
  font-weight: 500;
}

.nav {
  display: flex;
  gap: 4px;
}

.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-2);
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nav a:hover,
.nav a[aria-current="page"] {
  background: var(--surface);
  color: var(--text);
}

/* links inside running text */
.lede a,
.section-head a,
.prose a {
  color: var(--violet);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
}

.lede a:hover,
.section-head a:hover,
.prose a:hover {
  text-decoration-color: currentColor;
}

@media (prefers-color-scheme: dark) {
  .lede a,
  .section-head a,
  .prose a {
    color: var(--periwinkle);
  }
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 48px;
  padding: 56px 0 72px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--violet);
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  .eyebrow {
    color: var(--periwinkle);
  }
}

h1 {
  font-size: clamp(2.4rem, 5.4vw, 4rem);
  line-height: 1.04;
}

.mark {
  background: linear-gradient(transparent 62%, color-mix(in srgb, var(--yellow) 85%, transparent) 62% 90%, transparent 90%);
  padding-inline: 0.06em;
}

@media (prefers-color-scheme: dark) {
  .mark {
    background: linear-gradient(transparent 62%, color-mix(in srgb, var(--violet) 80%, transparent) 62% 90%, transparent 90%);
  }
}

.lede {
  max-width: 34rem;
  margin: 20px 0 30px;
  color: var(--text-2);
  font-size: 1.12rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.btn-primary {
  border-color: transparent;
  background: var(--btn);
  color: var(--btn-text);
}

.btn-small {
  min-height: 40px;
  padding: 8px 16px;
  align-self: flex-start;
  font-size: 0.95rem;
}

/* three covers fanned out like cards in a hand */
.hero-art {
  position: relative;
  aspect-ratio: 5 / 4;
}

.fan {
  position: absolute;
  width: 72%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 6px solid var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
}

.fan-1 {
  left: 0;
  top: 8%;
  transform: rotate(-8deg);
}

.fan-2 {
  right: 0;
  top: 2%;
  transform: rotate(7deg);
}

.fan-3 {
  left: 14%;
  bottom: 4%;
  transform: rotate(-1deg);
  animation: bob 6s ease-in-out infinite;
}

@keyframes bob {
  50% {
    transform: rotate(-1deg) translateY(-8px);
  }
}

/* ---------- sections ---------- */

.section {
  padding: 32px 0 56px;
  scroll-margin-top: 16px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 24px;
  margin-bottom: 24px;
}

.section-head p {
  margin: 0;
  color: var(--text-2);
}

h2 {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
}

.count {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding-inline: 8px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--chip-text);
  font: 600 1rem/1 var(--font-body);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card,
.feature {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card img,
.feature img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.35s;
}

.card:hover,
.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.card:hover img,
.feature:hover img {
  transform: scale(1.04);
}

.card-body,
.feature-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px 20px;
}

.card-title {
  font-size: 1.3rem;
  line-height: 1.2;
}

.card-text {
  flex: 1;
  color: var(--text-2);
  font-size: 0.98rem;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--chip-text);
  font-size: 0.8rem;
  font-weight: 600;
}

.chip-new {
  align-self: flex-start;
  background: var(--mint);
  color: #0f3d27;
}

.go {
  font-weight: 600;
  transition: transform 0.2s;
}

.card:hover .go {
  transform: translateX(4px);
}

/* a featured project: picture beside the text on wider screens */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}

.feature img {
  height: 100%;
  aspect-ratio: 1200 / 630;
}

.feature-body {
  justify-content: center;
  gap: 12px;
  padding: 32px;
}

.feature .card-title {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
}

.feature .card-text {
  flex: none;
  font-size: 1.05rem;
}

/* illustration tiles: 4:3 artwork with its title on a pill */
.art-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.art {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.art img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.35s;
}

.art:hover {
  transform: translateY(-4px) rotate(-0.6deg);
  box-shadow: var(--shadow-lift);
}

.art:hover img {
  transform: scale(1.05);
}

.art-title {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(6px);
  font: 600 0.95rem/1.2 var(--font-display);
}

.section-cta {
  margin: 24px 0 0;
}

.contact {
  margin-bottom: 24px;
  padding: 44px 32px;
  border-radius: calc(var(--radius) + 8px);
  background:
    radial-gradient(28rem 16rem at 0% 0%, color-mix(in srgb, var(--pink) 40%, transparent), transparent 70%),
    radial-gradient(28rem 16rem at 100% 100%, color-mix(in srgb, var(--cyan) 45%, transparent), transparent 70%),
    var(--surface);
  border: 1px solid var(--line);
  text-align: center;
}

.contact p {
  margin: 10px 0 24px;
  color: var(--text-2);
}

.contact .actions {
  justify-content: center;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 24px 0 40px;
  color: var(--text-2);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.footer-links a {
  color: var(--text-2);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* ---------- freelance badge, proof strip, services ---------- */

.hello {
  margin: 0 0 10px;
  color: var(--violet);
  font: 600 clamp(1.1rem, 2vw, 1.35rem) / 1.3 var(--font-display);
}

@media (prefers-color-scheme: dark) {
  .hello {
    color: var(--periwinkle);
  }
}

.available {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.92rem;
  box-shadow: var(--shadow);
}

.available-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }
}

.proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 40px;
  padding: 0;
  list-style: none;
}

.proof li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.proof strong {
  font: 600 1.35rem/1.15 var(--font-display);
}

.proof span {
  color: var(--text-2);
  font-size: 0.92rem;
  line-height: 1.4;
}

.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.service-dot {
  width: 38px;
  height: 38px;
  margin-bottom: 6px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--dot), color-mix(in srgb, var(--dot) 55%, white));
}

.service h3 {
  margin: 0;
  font: 600 1.25rem/1.25 var(--font-display);
}

.service p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.98rem;
}

.service .service-proof {
  margin-top: auto;
  padding-top: 8px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
}

.service-proof a,
.section-note a {
  color: var(--violet);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
}

@media (prefers-color-scheme: dark) {
  .service-proof a,
  .section-note a {
    color: var(--periwinkle);
  }
}

.section-note {
  margin: 20px 0 0;
  color: var(--text-2);
  font-size: 0.95rem;
}

/* ---------- work filters ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font: 600 0.92rem/1.2 var(--font-body);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.filter:hover {
  color: var(--text);
}

.filter[aria-pressed="true"] {
  border-color: transparent;
  background: var(--btn);
  color: var(--btn-text);
}

.grid li[hidden] {
  display: none;
}

/* ---------- journey timeline and brands ---------- */

.timeline {
  position: relative;
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  /* the line through the dots */
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 117px;
  width: 2px;
  background: linear-gradient(var(--pink), var(--periwinkle), var(--cyan));
  border-radius: 2px;
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 44px;
  padding: 10px 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 111px;
  top: 16px;
  width: 14px;
  height: 14px;
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: var(--periwinkle);
}

.timeline li.now::before {
  background: #22c55e;
}

.when {
  padding-top: 2px;
  color: var(--text-2);
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.timeline strong {
  font: 600 1.15rem/1.3 var(--font-display);
}

.timeline p {
  margin: 4px 0 0;
  color: var(--text-2);
}

.brands-section {
  text-align: center;
}

.brands-title {
  display: block;
  margin-bottom: 20px;
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
}

.brands {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.brands li {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 600;
}

/* ---------- about page ---------- */

.page {
  width: min(760px, 100% - 32px);
  padding: 40px 0 48px;
}

.page h1 {
  font-size: clamp(2.6rem, 6vw, 4rem);
}

.page h2 {
  margin: 44px 0 18px;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
}

.page .lede {
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.prose p {
  margin: 18px 0 0;
  font-size: 1.08rem;
}

.page h2 + .prose p:first-child {
  margin-top: 0;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.facts strong {
  font: 600 1.15rem/1.25 var(--font-display);
}

.facts span:last-child {
  color: var(--text-2);
  font-size: 0.95rem;
}

.fact-dot {
  width: 14px;
  height: 14px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: var(--dot);
}

/* ---------- smaller screens ---------- */

@media (max-width: 1000px) {
  .grid,
  .services,
  .proof {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding: 24px 0 48px;
  }

  .hero-art {
    max-width: 520px;
    width: 100%;
    margin-inline: auto;
  }

  .feature {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature img {
    height: auto;
  }

  .feature-body {
    padding: 20px;
  }

  .art-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .facts {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .grid,
  .services {
    grid-template-columns: minmax(0, 1fr);
  }

  .proof {
    gap: 10px;
  }

  .proof li {
    padding: 14px;
  }

  .proof strong {
    font-size: 1.1rem;
  }

  /* timeline: years above the text, line on the left */
  .timeline::before {
    left: 6px;
  }

  .timeline li {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    padding-left: 30px;
  }

  .timeline li::before {
    left: 0;
    top: 14px;
  }

  .when {
    text-align: left;
  }

  .brand-sub,
  .nav .hide-sm {
    display: none;
  }

  .contact {
    padding: 32px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
