/* Clumsy Cloud Studio
   Editorial + color: serif display, gradient accents, cards. Light + dark. */

:root {
  /* Brand: Electric Cloud Blue #1769FF, Digital Violet #7868FF,
     Midnight Navy #071B3D, Cloud White #F6F8FC, Mist Gray #DDE4EF,
     Soft Apricot #FFB38A. */
  --bg: #f6f8fc;
  --surface: #ffffff;
  --ink: #071b3d;
  --muted: #55668a;
  --faint: #8b98af;
  --blue: #1769ff;
  --violet: #7868ff;
  --apricot: #ffb38a;
  --line: rgba(7, 27, 61, 0.10);
  --line-strong: rgba(7, 27, 61, 0.16);
  --grad: linear-gradient(115deg, #1769ff, #7868ff);
  --shadow: 0 2px 6px rgba(7, 27, 61, 0.05), 0 20px 48px rgba(7, 27, 61, 0.09);
  --shadow-accent: 0 12px 30px color-mix(in srgb, var(--accent, #1769ff) 30%, transparent);

  --pad: clamp(1.5rem, 5vw, 4rem);
  --measure: 66ch;
  --radius: 20px;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
    Helvetica, Arial, system-ui, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype",
    Palatino, Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #060f22;
    --surface: #0d1c3a;
    --ink: #f3f6fc;
    --muted: #a3b1cc;
    --faint: #6f7fa0;
    --blue: #5b93ff;
    --violet: #9c8bff;
    --line: rgba(221, 228, 239, 0.12);
    --line-strong: rgba(221, 228, 239, 0.22);
    --shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 22px 50px rgba(0, 0, 0, 0.5);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: 0.6rem 1rem;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Film grain ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  mix-blend-mode: overlay;
}
@media (prefers-color-scheme: dark) {
  .grain {
    opacity: 0.05;
  }
}

.masthead,
main,
.footer {
  max-width: 1040px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- Masthead ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.1rem;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.brand__mark {
  width: 24px;
  height: auto;
  flex: none;
}
.brand__cloud {
  stroke: var(--blue);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand__fog {
  stroke: var(--violet);
  stroke-width: 2;
  stroke-linecap: round;
}
.brand__name {
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 1rem;
  color: var(--ink);
}
.masthead__nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 1.9rem);
  font-size: 0.9rem;
}
.masthead__nav a {
  color: var(--muted);
  transition: color 0.2s ease;
}
.masthead__nav a:hover {
  color: var(--ink);
}
.masthead__cta {
  color: #fff !important;
  background: var(--grad);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 500;
  box-shadow: 0 6px 16px rgba(23, 105, 255, 0.28);
}
.masthead__cta:hover {
  opacity: 0.92;
}

/* ---------- Labels ---------- */
.kicker,
.label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.kicker__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--apricot);
  flex: none;
}
.label__mark {
  width: 22px;
  height: 3px;
  border-radius: 3px;
  background: var(--grad);
  flex: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: clamp(3rem, 9vw, 6.5rem);
  padding-bottom: clamp(3rem, 8vw, 5.5rem);
}
.hero__aura {
  position: absolute;
  inset: -6% -6% auto -6%;
  height: 560px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 48% at 24% 24%, rgba(23, 105, 255, 0.38), transparent 62%),
    radial-gradient(34% 46% at 74% 16%, rgba(120, 104, 255, 0.34), transparent 62%),
    radial-gradient(24% 32% at 12% 78%, rgba(255, 155, 106, 0.22), transparent 66%);
  filter: blur(28px) saturate(1.05);
  mask-image: radial-gradient(120% 100% at 40% 30%, black 45%, transparent 92%);
  -webkit-mask-image: radial-gradient(120% 100% at 40% 30%, black 45%, transparent 92%);
  translate: var(--px, 0px) var(--py, 0px);
  animation: aura-drift 24s ease-in-out infinite alternate;
  will-change: transform, translate;
  transition: translate 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes aura-drift {
  0% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.08) rotate(2deg);
  }
  100% {
    transform: scale(1.02) rotate(-2deg);
  }
}
@media (prefers-color-scheme: dark) {
  .hero__aura {
    background:
      radial-gradient(38% 48% at 24% 24%, rgba(23, 105, 255, 0.34), transparent 62%),
      radial-gradient(34% 46% at 74% 16%, rgba(120, 104, 255, 0.3), transparent 62%),
      radial-gradient(24% 32% at 12% 78%, rgba(255, 155, 106, 0.16), transparent 66%);
  }
}
.hero__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 5.6vw, 4.2rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 17ch;
  margin-top: 1.5rem;
}
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__title em {
  font-style: italic;
  letter-spacing: -0.01em;
}
.hero__lede {
  margin-top: 1.6rem;
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: 48ch;
}
.hero__actions {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 500;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease,
    color 0.2s ease, opacity 0.2s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn--grad {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 26px rgba(23, 105, 255, 0.32);
}
.btn--grad:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(23, 105, 255, 0.4);
}
.btn--ghost {
  border: 1px solid var(--line-strong);
  color: var(--ink);
}
.btn--ghost:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.facts {
  list-style: none;
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--muted);
}
.facts strong {
  color: var(--ink);
  font-weight: 700;
}

/* ---------- Blocks ---------- */
.block {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.block__head {
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}
.block__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 26ch;
  margin-top: 1rem;
}

/* ---------- Work cards ---------- */
.cards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 2.6vw, 2.1rem);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity 0.28s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow), var(--shadow-accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line-strong));
}
.card:hover::before {
  opacity: 1;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    240px circle at var(--mx, 50%) var(--my, 0%),
    color-mix(in srgb, var(--accent) 14%, transparent),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}
.card:hover::after {
  opacity: 1;
}
.card__icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(140deg, var(--accent), var(--accent2));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent);
}
.card__icon--img {
  background: var(--surface);
  overflow: hidden;
}
.card__icon--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}
.card__title {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.card__desc {
  color: var(--muted);
  font-size: 1rem;
}
.card__cta {
  align-self: flex-start;
  font-size: 0.92rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--accent) 75%, var(--ink));
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.card__cta:hover {
  border-color: currentColor;
}
.card__foot {
  margin-top: auto;
  padding-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  border-top: 1px solid var(--line);
}
.chip {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 72%, var(--ink));
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}
.card__plat {
  font-size: 0.85rem;
  color: var(--faint);
}

/* ---------- Services ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.service {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-top: 1.5rem;
  border-top: 2px solid transparent;
  border-image: var(--grad) 1;
}
.service__num {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.service__title {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.service__desc {
  color: var(--muted);
  font-size: 1.02rem;
}

/* ---------- About ---------- */
.prose {
  max-width: var(--measure);
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}
.prose__lead {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.prose p:not(.prose__lead) {
  color: var(--muted);
  font-size: 1.08rem;
}

/* ---------- Contact panel ---------- */
.contact-panel {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  background: linear-gradient(135deg, #0b1f4d, #071b3d);
  color: #fff;
  isolation: isolate;
}
.contact-panel__aura {
  position: absolute;
  inset: auto -10% -60% 30%;
  height: 420px;
  z-index: -1;
  background:
    radial-gradient(45% 60% at 30% 40%, rgba(23, 105, 255, 0.55), transparent 70%),
    radial-gradient(45% 60% at 75% 60%, rgba(120, 104, 255, 0.5), transparent 70%);
  filter: blur(10px);
}
.contact-panel__label {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}
.contact-panel__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 3.6vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-top: 1rem;
  max-width: 20ch;
}
.contact-panel__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1rem 1.25rem;
  margin-top: 2rem;
}
.contact-panel__email {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  color: #fff;
  border-bottom: 2px solid rgba(255, 255, 255, 0.4);
  padding-bottom: 4px;
  transition: border-color 0.2s ease;
  user-select: all;
  -webkit-user-select: all;
}
.contact-panel__email:hover {
  border-color: #fff;
}
.copy-btn {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.copy-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.6);
}
.contact-panel__note {
  margin-top: 1.4rem;
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.75);
  max-width: 44ch;
}

/* ---------- Footer ---------- */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- Reveal (keyframes, so it never overrides hover transitions) ---------- */
.reveal {
  opacity: 0;
}
.reveal.is-visible {
  animation: rise 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--rd, 0ms);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .cards,
  .services {
    grid-template-columns: 1fr;
  }
  .masthead__nav {
    gap: 1rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 460px) {
  .masthead__nav a:not(.masthead__cta) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }
  .hero__aura {
    animation: none;
    translate: none;
  }
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

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