/* ==========================================================================
   Mika Torres — design tokens
   BG #FAF8FF · Ink #14121F · Ink-soft #5B5770 · Line #E7E3F5
   Accents: Indigo #5B5FEF · Coral #FF6B4A · Teal #12A594 · Amber #FFB238 · Pink #F45D9A
   Display: Space Grotesk · Body/UI: Inter
   ========================================================================== */

:root {
  --bg: #FAF8FF;
  --ink: #14121F;
  --ink-soft: #5B5770;
  --line: #E7E3F5;
  --card: #FFFFFF;

  --indigo: #5B5FEF;
  --coral: #FF6B4A;
  --teal: #12A594;
  --amber: #E9A400;
  --pink: #F45D9A;

  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --wrap: 1180px;
  --gap: clamp(1.25rem, 3vw, 2.5rem);
  --radius: 14px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }

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

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gap);
  position: relative;
  z-index: 1;
}

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

/* ---------- Background blobs ---------- */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
}
.blob-a {
  width: 480px; height: 480px;
  top: -160px; right: -140px;
  background: radial-gradient(circle at 30% 30%, var(--indigo), transparent 70%);
}
.blob-b {
  width: 420px; height: 420px;
  bottom: 10%; left: -180px;
  background: radial-gradient(circle at 60% 40%, var(--pink), transparent 70%);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--indigo); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); }

.btn-plan {
  width: 100%;
  justify-content: center;
  background: var(--ink);
  color: var(--bg);
  margin-top: 1.5rem;
}
.btn-plan:hover { background: var(--indigo); }

/* ---------- Accent utility ---------- */
.accent-indigo { --accent: var(--indigo); }
.accent-coral  { --accent: var(--coral); }
.accent-teal   { --accent: var(--teal); }
.accent-amber  { --accent: var(--amber); }
.accent-pink   { --accent: var(--pink); }

/* ---------- Animation system ---------- */

/* Scroll-triggered reveal: elements fade + rise into place once, the first time they're seen */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* One orchestrated entrance for the hero, staggered via JS transition-delay */
.hero-enter {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-enter.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Gentle ambient float on the hero's decorative shapes only */
@keyframes float-a {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(6px, -14px); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0, 0) rotate(18deg); }
  50% { transform: translate(-8px, 10px) rotate(24deg); }
}
@keyframes float-c {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-6px, -8px); }
}
.shape-1 { animation: float-a 7s ease-in-out infinite; }
.shape-2 { animation: float-b 8s ease-in-out infinite; }
.shape-3 { animation: float-c 6.5s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .hero-enter { opacity: 1; transform: none; }
  .shape-1, .shape-2, .shape-3 { animation: none; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 248, 255, 0.7);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-scrolled {
  background: rgba(250, 248, 255, 0.92);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px -20px rgba(20, 18, 31, 0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
}
.wordmark span { color: var(--indigo); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.main-nav a:not(.nav-cta) {
  position: relative;
  padding-bottom: 4px;
}
.main-nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}
.main-nav a:not(.nav-cta):hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-cta {
  padding: 0.55rem 1.2rem;
  background: var(--ink);
  color: var(--bg) !important;
  border-radius: 100px;
}
.nav-cta:hover { background: var(--indigo); border-color: transparent !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(3rem, 8vw, 5.5rem);
}

.hero-kicker {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  line-height: 1.1;
}

.hero-lede {
  margin-top: 1.5rem;
  max-width: 44ch;
  font-size: 1.1rem;
  color: var(--ink-soft);
}

.hero-actions {
  margin-top: 2.25rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-portrait {
  width: min(320px, 80%);
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 28px;
  position: relative;
  z-index: 2;
  box-shadow: 0 30px 60px -30px rgba(20, 18, 31, 0.35);
}

.hero-shape {
  position: absolute;
  border-radius: 50%;
  z-index: 1;
}
.shape-1 { width: 120px; height: 120px; background: var(--amber); top: -10px; left: 10%; opacity: 0.9; }
.shape-2 { width: 90px; height: 90px; background: var(--teal); bottom: 40px; right: 5%; border-radius: 28px; transform: rotate(18deg); }
.shape-3 { width: 70px; height: 70px; background: var(--pink); bottom: -20px; left: 22%; }

.hero-badge {
  position: absolute;
  right: -10px;
  bottom: -10px;
  z-index: 3;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px -25px rgba(20,18,31,0.3);
}
.hero-badge strong { font-family: var(--font-display); font-size: 1.4rem; }
.hero-badge span { color: var(--ink-soft); font-size: 0.82rem; }

/* ---------- Section head (shared) ---------- */
.section-head {
  margin-bottom: clamp(2rem, 4vw, 3rem);
  padding-top: clamp(3rem, 6vw, 4.5rem);
}

.section-kicker {
  color: var(--indigo);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.6rem;
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
  padding-bottom: clamp(2rem, 5vw, 3rem);
  border-bottom: 1px solid var(--line);
}

.about-lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 56ch;
}

.about-facts {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.fact {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.fact:last-child { border-bottom: none; padding-bottom: 0; }

.fact strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--indigo);
}
.fact span { color: var(--ink-soft); font-size: 0.92rem; }

/* ---------- Skills ---------- */
.skills { padding-bottom: clamp(1rem, 3vw, 2rem); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.skill-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.skill-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -28px rgba(20, 18, 31, 0.35);
}

.skill-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  margin-bottom: 1rem;
  transition: transform 0.25s ease;
}
.skill-card:hover .skill-dot { transform: scale(1.4); }

.skill-card h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.skill-card p { color: var(--ink-soft); font-size: 0.96rem; }

/* ---------- Services ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.service-card {
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.service-tag {
  display: inline-block;
  width: 28px;
  height: 6px;
  border-radius: 4px;
  background: var(--accent);
  margin-bottom: 1rem;
}

.service-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.service-card p { color: var(--ink-soft); font-size: 0.94rem; }

/* ---------- Work ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-card { display: block; }

.project-img {
  aspect-ratio: 16/10;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.project-card:hover .project-img { transform: scale(1.035); }

.project-meta h3 { transition: color 0.2s ease; }
.project-card:hover .project-meta h3 { color: var(--indigo); }

.project-meta {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.project-meta h3 { font-size: 1.1rem; }

.project-tag {
  font-size: 0.82rem;
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
  background: color-mix(in srgb, var(--accent) 15%, white);
  color: var(--accent);
  white-space: nowrap;
}

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

.plan-card {
  position: relative;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.25s ease;
}
.plan-card:hover {
  border-color: var(--accent);
  box-shadow: 0 24px 48px -30px rgba(20, 18, 31, 0.4);
}

.plan-card.is-featured {
  border-color: var(--accent);
  transform: translateY(-10px);
}
.plan-card.is-featured:hover { transform: translateY(-14px); }

.plan-badge {
  position: absolute;
  top: -13px;
  left: 2rem;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
}

.plan-card h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }

.plan-desc { color: var(--ink-soft); font-size: 0.92rem; min-height: 3em; }

.plan-price {
  margin: 1.5rem 0;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.plan-amount {
  font-family: var(--font-display);
  font-size: 2.1rem;
}

.plan-cadence { color: var(--ink-soft); font-size: 0.9rem; }

.plan-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.plan-features li {
  padding-left: 1.4rem;
  position: relative;
  font-size: 0.93rem;
  color: var(--ink-soft);
}
.plan-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Contact ---------- */
.contact {
  padding-block: clamp(3.5rem, 8vw, 5.5rem);
  border-top: 1px solid var(--line);
  margin-top: clamp(2rem, 5vw, 3rem);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}

.contact-copy h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 1.1rem; }
.contact-copy p { color: var(--ink-soft); max-width: 40ch; margin-bottom: 1.5rem; }

.contact-email {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--indigo);
  border-bottom: 2px solid var(--indigo);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.contact-form input,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--indigo); }

.form-notice {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.form-notice--success { background: color-mix(in srgb, var(--teal) 15%, white); color: var(--teal); }
.form-notice--error   { background: color-mix(in srgb, var(--coral) 15%, white); color: var(--coral); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 2.5rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-bottom: 2rem;
}

.footer-nav { display: flex; gap: 1.5rem; font-size: 0.92rem; }
.footer-nav a:hover { text-decoration: underline; }

.footer-social { display: flex; gap: 1.25rem; font-size: 0.92rem; }
.footer-social a:hover { color: var(--indigo); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 1.25rem 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { order: -1; margin-bottom: 1rem; }
  .about-grid { grid-template-columns: 1fr; }
  .skills-grid, .service-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .plan-card.is-featured { transform: none; }
  .contact-inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .main-nav {
    position: absolute;
    top: 76px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem var(--gap) 2rem;
    gap: 1.25rem;
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .nav-toggle { display: flex; }
  .skills-grid, .service-grid, .work-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
