/* ==========================================================================
   Ônia — Ânia Assunção portfolio
   Palette and type taken from the original Framer project.
   ========================================================================== */

:root {
  --purple: #994e8a;
  --yellow: #ffef91;
  --cream: #fffceb;
  --plum: #36002b;
  --ink: #050000;

  --f-display: 'Notable', 'Arial Black', sans-serif;
  --f-body: 'Kalnia', Georgia, serif;
  --f-caption: 'Lancelot', Georgia, serif;
  --f-sans: 'Inter', system-ui, sans-serif;

  --maxw: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: clamp(16px, 0.9vw + 8px, 20px);
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--ink);
  background: var(--page-bg, #fff);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
html { overflow-x: clip; }

img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
p { margin: 0 0 0.9em; text-align: justify; hyphens: auto; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 1.1;
  text-transform: uppercase;
}

/* Type scale (Notable sizes from the original: 100 / 80 / 60 / 40 / 30) */
.t-hero, .t-xl, .t-lg, .t-md, .t-sm {
  font-family: var(--f-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.1;
  text-align: left;
  hyphens: none;
}
.t-hero { font-size: clamp(42px, 6.95vw, 100px); letter-spacing: -0.04em; }
.t-xl   { font-size: clamp(38px, 5.6vw, 80px);  letter-spacing: -0.04em; }
.t-lg   { font-size: clamp(32px, 4.2vw, 60px);  letter-spacing: -0.04em; }
.t-md   { font-size: clamp(26px, 2.8vw, 40px);  letter-spacing: -0.04em; }
.t-sm   { font-size: clamp(21px, 2.1vw, 30px);  letter-spacing: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.caption { font-family: var(--f-caption); font-size: 16px; letter-spacing: -0.02em; text-align: left; }

:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }

/* ---------- Reveal on scroll ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: var(--delay, 0s);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   Shared components
   ========================================================================== */

/* ---------- Ticker / marquee ---------- */
.ticker {
  --tk-bg: var(--plum);
  --tk-fg: var(--cream);
  position: relative;
  overflow: hidden;
  background: var(--tk-bg);
  color: var(--tk-fg);
  border-radius: 10px;
  height: clamp(64px, 7vw, 100px);
  display: flex;
  align-items: center;
}
.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker var(--tk-dur, 40s) linear infinite;
  will-change: transform;
}
.ticker__group { display: flex; align-items: center; flex-shrink: 0; }
.ticker__text {
  font-family: var(--f-display);
  text-transform: uppercase;
  font-size: clamp(20px, 2.1vw, 30px);
  white-space: nowrap;
  padding-inline: clamp(24px, 3vw, 48px);
}
.ticker__dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: currentColor; opacity: .55; flex-shrink: 0;
}
.ticker--home .ticker__text {
  font-family: var(--f-body);
  text-transform: none;
  font-size: clamp(20px, 1.8vw, 26px);
  letter-spacing: -0.02em;
  padding-inline: clamp(28px, 4vw, 70px);
}
.ticker__onion {
  height: clamp(44px, 5.2vw, 76px);
  width: auto;
  margin-inline: clamp(36px, 6vw, 100px);
}
.ticker__onion:nth-child(3n + 1) { height: clamp(40px, 4.6vw, 66px); }
@keyframes ticker {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

/* ---------- Onion buttons (Home / Next) ---------- */
.onion-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  font-family: var(--f-caption);
  font-size: 16px;
  color: var(--purple);
}
.onion-btn img {
  width: 38px;
  transform-origin: 50% 100%;
  transition: transform .4s var(--ease-out);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .18));
}
.onion-btn:hover img, .onion-btn:focus-visible img { animation: wiggle .7s ease-in-out; }
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-12deg) scale(1.08); }
  45% { transform: rotate(10deg) scale(1.08); }
  70% { transform: rotate(-5deg) scale(1.04); }
}
.onion-btn--home {
  position: fixed;
  z-index: 50;
  top: 14px;
  left: 18px;
  padding: 8px 10px 6px;
  border-radius: 999px;
  background: rgba(255, 252, 235, .82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .12);
}
.onion-btn--home img { width: 26px; filter: none; }
.onion-btn--home span { font-size: 14px; line-height: 1; }

/* ---------- Pills (Role / Tools / Members) ---------- */
.meta {
  --pill-bg: var(--cream);
  --pill-fg: var(--ink);
  --meta-fg: var(--cream);
  display: flex;
  flex-wrap: wrap;
  gap: 22px 28px;
}
.meta__group { min-width: 165px; }
.pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 165px;
  height: 37px;
  border-radius: 15px;
  background: var(--pill-bg);
  color: var(--pill-fg);
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.02em;
  padding-top: 2px;
}
.meta__items {
  margin-top: 6px;
  padding-left: 7px;
  font-family: var(--f-caption);
  font-size: 16px;
  line-height: 1.4;
  color: var(--meta-fg);
}
.meta__items--inline { display: flex; flex-wrap: wrap; column-gap: 18px; max-width: 200px; }

/* ---------- Briefing / Our goal ---------- */
.brief {
  --brief-bg: var(--cream);
  --brief-title: var(--purple);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-block: 10px;
}
.brief__col { display: grid; grid-template-rows: auto 1fr; gap: 10px; }
.brief__title {
  background: var(--brief-bg);
  color: var(--brief-title);
  text-align: center;
  padding: clamp(28px, 3.6vw, 52px) 20px;
}
.brief__body {
  background: var(--brief-bg);
  color: var(--brief-fg, var(--ink));
  padding: clamp(18px, 2vw, 28px) clamp(20px, 3vw, 44px) clamp(36px, 5vw, 72px);
  min-height: 180px;
}

/* ---------- Project page footer ---------- */
.proj-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(28px, 3vw, 40px) var(--gutter);
  background: var(--footer-bg, var(--plum));
  color: var(--cream);
}
.proj-footer h2 { color: var(--yellow); }
.proj-footer__contact a {
  display: inline-block;
  margin-top: 6px;
  font-size: clamp(18px, 1.8vw, 26px);
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .4s var(--ease-out);
  overflow-wrap: anywhere;
}
.proj-footer__contact a:hover { background-size: 100% 1px; }
.onion-btn--next { color: var(--yellow); }
.onion-btn--next img { width: 46px; }

/* ---------- Media helpers ---------- */
.media { width: 100%; height: auto; }
.media--cover { object-fit: cover; }
.video-frame { position: relative; background: #000; }
.video-frame video { width: 100%; height: auto; }
.credit { font-family: var(--f-caption); font-size: 16px; margin-top: 8px; text-align: left; }

/* ==========================================================================
   Home
   ========================================================================== */
.page-home { --page-bg: var(--purple); }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--purple); color: var(--cream); }
.nav {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: clamp(10px, 1.3vw, 18px) clamp(16px, 1.6vw, 24px);
}
.nav__logo {
  font-family: var(--f-display);
  text-transform: uppercase;
  font-size: clamp(18px, 2.1vw, 30px);
  text-decoration: none;
  color: var(--cream);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav__links {
  display: flex;
  gap: clamp(28px, 10.5vw, 150px);
  margin-left: clamp(24px, 6vw, 88px);
  flex: 1;
}
.nav__links a {
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  font-size: clamp(15px, 1.4vw, 20px);
  transition: transform .3s var(--ease-out), color .3s;
}
.nav__links a:hover { transform: scale(1.1); color: var(--cream); }
.nav__onion {
  width: clamp(26px, 2.95vw, 42px);
  margin-left: auto;
  margin-right: clamp(4px, 4vw, 52px);
  transform-origin: 50% 100%;
  animation: sway 5s ease-in-out infinite;
}
@keyframes sway {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(5deg); }
}

.hero__canvas {
  position: relative;
  aspect-ratio: 1440 / 691;
  container-type: inline-size;
  overflow: hidden;
}
.hero__wave { position: absolute; left: 0; top: 33.14%; width: 100%; height: 66.86%; }
.hero__creative, .hero__portfolio {
  position: absolute;
  margin: 0;
  font-family: var(--f-display);
  text-transform: uppercase;
  color: var(--yellow);
  line-height: 1.1;
  white-space: nowrap;
}
.hero__creative { left: 18.6%; top: 20.7%; font-size: 2.78cqw; letter-spacing: -0.04em; }
.hero__portfolio { left: 30.35%; top: 22.58%; font-size: 6.95cqw; letter-spacing: -0.04em; }
.hero__onia { position: absolute; left: 40.5%; top: 53.5%; width: 35.7%; }
.hero__plant { position: absolute; left: 6.11%; top: 21.85%; width: 12.64%; aspect-ratio: 182 / 444; }
.hero__plant > * { position: absolute; }
.hero__onion { left: 0.44%; top: 38.83%; width: 99.8%; }
.sprout { overflow: visible; }
.sprout--a { left: 28.02%; top: 0; width: 14.29%; height: 65.09%; }
.sprout--b { left: 41.37%; top: 17.12%; width: 14.5%; height: 46.85%; transform: rotate(10deg); }
.sprout--c { left: 27.47%; top: 35.14%; width: 16.48%; height: 26.58%; }
.sprout--d { left: 44.51%; top: 36.94%; width: 4.4%; height: 15.99%; }

/* hero entrance */
.js .hero__creative, .js .hero__portfolio, .js .hero__onia, .js .hero__plant {
  animation: rise 1.1s var(--ease-out) both;
}
.js .hero__portfolio { animation-delay: .12s; }
.js .hero__onia { animation-delay: .3s; }
.js .hero__plant { animation-name: grow; animation-delay: .2s; transform-origin: 50% 100%; }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { opacity: 0; transform: scaleY(.6); } to { opacity: 1; transform: none; } }

/* ---------- About ---------- */
.about {
  background: var(--yellow);
  padding-block: clamp(24px, 2.5vw, 36px) clamp(60px, 7vw, 100px);
  margin-top: -1px;
}
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 470px) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 84px);
  align-items: start;
  max-width: 1440px;
}
.about__intro { padding-top: clamp(0px, 3vw, 44px); }
.about__intro h2 { color: var(--purple); margin-bottom: 18px; text-align: center; }
.petals {
  position: relative;
  width: 100%;
  aspect-ratio: 468 / 540;
  container-type: inline-size;
}
.petal {
  position: absolute;
  width: 37.39%;
  height: 31.85%;
  fill: var(--purple);
  stroke: var(--yellow);
  stroke-width: 5;
  overflow: visible;
}
.js .petals .petal {
  opacity: 0;
  transform: scale(.6);
  transition: opacity .6s var(--ease-out), transform .8s var(--ease-out);
  transition-delay: calc(var(--i) * 70ms);
}
.js .petals.is-visible .petal { opacity: 1; transform: none; }
.petals__iam, .petals__name {
  position: absolute;
  font-family: var(--f-display);
  text-transform: uppercase;
  color: var(--yellow);
  line-height: 1.1;
  white-space: nowrap;
}
.petals__iam { left: 6.2%; top: 29.1%; font-size: 8.55cqw; letter-spacing: -0.04em; }
.petals__name { left: 29.5%; top: 37.2%; font-size: 21.37cqw; letter-spacing: -0.04em; }
.about__why { margin-top: clamp(40px, 5vw, 70px); max-width: 1440px; }
.about__why h3 { color: var(--purple); margin: 0 0 18px clamp(0px, 7.5vw, 105px); }

/* ---------- Layers (scroll-driven onion) ---------- */
.layers { background: var(--yellow); padding-top: clamp(28px, 3vw, 40px); }
.layers__title { color: var(--purple); max-width: 1100px; }
.layers__title p { text-align: left; margin: 0; }
.layers__title h2 { margin-left: clamp(40px, 17vw, 240px); }
.layers__track { position: relative; height: 380vh; }
.layers__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
}
/* Stage is laid out in fixed design pixels (1000×780) and scaled to fit the viewport by JS */
.layers__stage {
  --cy: 390px;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1000px;
  height: 780px;
  transform: translate(-50%, -50%) scale(var(--stage-scale, 1));
}
.layers__whole { position: absolute; left: calc(50% - 304.5px); top: calc(var(--cy) - 271px); width: 609px; height: 543px; max-width: none; z-index: 20; }
.layers__layer { position: absolute; left: calc(50% - 304.5px); top: calc(var(--cy) - 204px); width: 609px; height: 408px; max-width: none; opacity: 0; will-change: transform; }
.layers__label--1 { top: calc(var(--cy) - 151px); }
.layers__label--2 { top: var(--cy); }
.layers__label--3 { top: calc(var(--cy) + 149px); }
.app-icon--ps { left: 127px; top: 148px; }
.app-icon--ai { left: 247px; top: 199px; }
.app-icon--figma { left: 681px; top: 143px; width: 107px; height: 107px; object-fit: cover; clip-path: inset(2.5% round 22px); }
.app-icon--unity { left: 794px; top: 167px; width: 102px; height: 102px; object-fit: cover; }
.value-tag--1 { left: 26px; top: 501px; }
.value-tag--2 { left: 114px; top: 555px; }
.value-tag--3 { left: 675px; top: 467px; }
.value-tag--4 { left: 735px; top: 519px; }
.layers__label {
  position: absolute;
  left: 50%;
  width: 303px;
  transform: translate(-50%, -50%);
  text-align: center;
  font-family: var(--f-sans);
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: 0;
  color: #9b4a8b;
  opacity: 0;
  z-index: 10;
}
.layers__pop { position: absolute; opacity: 0; z-index: 8; will-change: transform, opacity; }
.app-icon {
  width: 108px;
  height: 102px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-family: 'Geologica', var(--f-sans);
  font-weight: 700;
  font-size: 86px;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: 0 10px 24px rgba(54, 0, 43, .18);
}
.app-icon--ps { background: #0a024d; color: #44c4f2; }
.app-icon--ai { background: #5e0000; color: #ffa114; }
.value-tag {
  width: 183px;
  height: 48px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--purple);
  color: var(--cream);
  font-size: 20px;
  box-shadow: 0 8px 18px rgba(54, 0, 43, .16);
}

/* ---------- Works / shopping cart ---------- */
.works { background: var(--purple); }
/* the band sits on the seam between the yellow layers section and the purple cart section */
.ticker-bridge { background: linear-gradient(var(--yellow) 50%, var(--purple) 50%); }
.works .wrap { max-width: 1440px; }
.works__title { color: var(--yellow); padding-top: clamp(16px, 2vw, 28px); line-height: 0.98; }
.works__title span { display: block; white-space: nowrap; }
.works__title span + span { padding-left: clamp(40px, 9.5vw, 135px); }
.basket {
  position: relative;
  width: min(1330px, 94vw);
  aspect-ratio: 707 / 503;
  margin: clamp(24px, 3vw, 40px) auto 0;
  container-type: inline-size;
}
.basket__img {
  position: absolute;
  left: 14.43%;
  top: -20.28%;
  width: 71.15%;
  height: 140.56%;
  max-width: none;
  transform: rotate(-90deg);
  pointer-events: none;
}
.basket__items {
  position: absolute;
  inset: 13% 15% 12%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  align-items: center;
  justify-items: center;
}
.cart-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  transition: transform .35s var(--ease-out);
}
.cart-item:hover, .cart-item:focus-visible { transform: scale(1.1); }
.cart-item__onion { position: relative; width: 12.6cqw; aspect-ratio: 354 / 529; }
.cart-item__onion > img { width: 100%; }
.cart-item__window {
  position: absolute;
  left: 2.9%;
  top: 42.7%;
  width: 94.3%;
  height: 44.6%;
  border-radius: 50%/ 44%;
  overflow: hidden;
  background: var(--cream);
}
.cart-item__window img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease-out); }
.cart-item__window.is-contain img { object-fit: contain; }
.cart-item:hover .cart-item__window img { transform: scale(1.08); }
.cart-item__label { margin-top: 0.4cqw; font-size: clamp(13px, 1.5cqw, 20px); white-space: nowrap; }
.js .basket .basket__items li { opacity: 0; transform: translateY(-40px); transition: opacity .6s var(--ease-out), transform .8s var(--ease-out); transition-delay: calc(.25s + var(--i) * 80ms); }
.js .basket.is-visible .basket__items li { opacity: 1; transform: none; }

/* ---------- Contact ---------- */
.contact { background: var(--purple); padding-top: clamp(40px, 6vw, 90px); padding-bottom: clamp(36px, 5vw, 60px); }
.contact__title, .contact__bye { color: var(--yellow); text-align: center; margin: 0; }
.contact__row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: clamp(4px, 1vw, 12px);
}
.contact__onion { position: relative; width: clamp(160px, 18.3vw, 264px); flex-shrink: 0; z-index: 2; margin-right: clamp(-52px, -3.5vw, -24px); }
.contact__onion > img { width: 100%; }
.contact__photo { position: absolute; left: 7.65%; top: 45.2%; width: 80.7%; height: 38.3%; border-radius: 64px; overflow: hidden; }
.contact__photo img { width: 100%; height: 100%; object-fit: cover; }
.contact__card {
  background: var(--yellow);
  border-radius: 34px;
  max-width: 749px;
  min-height: 351px;
  padding: clamp(24px, 2.4vw, 34px) clamp(22px, 2vw, 28px) clamp(32px, 3vw, 44px) clamp(48px, 4.4vw, 62px);
}
.contact__card h3 { color: var(--purple); margin-bottom: 18px; line-height: 1.2; }
.contact__email {
  display: inline-block;
  margin-top: clamp(28px, 4vw, 56px);
  font-size: clamp(18px, 1.8vw, 26px);
  color: var(--purple);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color .3s;
}
.contact__email:hover { color: var(--plum); text-decoration: underline; text-underline-offset: 4px; }
.contact__bye { margin-top: clamp(40px, 6vw, 80px); }

/* ---------- Home responsive ---------- */
@media (max-width: 900px) {
  .nav__links { gap: 22px; margin-left: 20px; }
  .about__grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr); gap: 28px; align-items: center; }
  .about__intro { padding-top: 0; }
  .contact__card { min-height: 0; }
}

/* Portrait arrangement of the onion stage: phones, and tablets held upright */
@media (max-width: 700px), (max-width: 1100px) and (orientation: portrait) {
  .layers__stage { --cy: 500px; width: 640px; height: 1000px; }
  .layers__label { font-size: 30px; }
  .app-icon--ps { left: 40px; top: 24px; }
  .app-icon--ai { left: 168px; top: 52px; }
  .app-icon--figma { left: 360px; top: 24px; }
  .app-icon--unity { left: 494px; top: 52px; }
  .value-tag { font-size: 24px; width: 200px; height: 56px; }
  .value-tag--1 { left: 10px; top: 820px; }
  .value-tag--2 { left: 100px; top: 888px; }
  .value-tag--3 { left: 330px; top: 820px; }
  .value-tag--4 { left: 420px; top: 888px; }
}

@media (max-width: 700px) {
  .nav { position: relative; flex-wrap: wrap; row-gap: 6px; padding-bottom: 4px; }
  .nav__links { order: 3; width: 100%; margin-left: 0; justify-content: space-between; gap: 8px; }
  .nav__links a { color: var(--yellow); font-size: 16px; padding-block: 6px; }
  .nav__onion { margin-right: 0; }

  /* taller hero composition so the title and ONIA stay readable on phones */
  .hero__canvas { margin-top: -4px; aspect-ratio: 390 / 330; }
  .hero__wave { top: 40%; height: 60%; }
  .hero__creative { left: 9%; top: 6%; font-size: 6cqw; }
  .hero__portfolio { left: 8%; top: 13%; font-size: 12.4cqw; }
  .hero__onia { left: 35%; top: 57%; width: 59%; }
  .hero__plant { left: 5%; top: 29%; width: 24%; }

  .about__grid { grid-template-columns: 1fr; }
  .petals { max-width: 380px; margin-inline: auto; }

  .t-hero { font-size: min(42px, 9.4vw); }
  .works__title span { white-space: normal; }
  .works__title span + span { padding-left: 8vw; }
  .basket { width: min(520px, 92vw); aspect-ratio: 503 / 707; }
  .basket__img { left: 0; top: 0; width: 100%; height: 100%; transform: none; }
  .basket__items { inset: 6% 6% 5%; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(4, 1fr); }
  .cart-item__onion { width: 15.5cqw; }
  .cart-item__label { font-size: 14px; margin-top: 2px; }

  .contact__row { flex-direction: column; }
  .contact__onion { margin: 0 0 -60px; width: 170px; }
  .contact__card { padding: 74px 22px 30px; text-align: left; }
}

/* Long justified lines leave gaps between words in narrow columns */
@media (max-width: 900px) {
  p { text-align: left; hyphens: manual; }
}
