/* codea.digital — the studio's front door: the codea tokens (white ground, light panels at the 20px radius, Nunito in the heavy weights,
   lower-case labels), one card per app, each in its own app's colour */
:root {
  --white: #ffffff;
  --light: #f5f5f5;
  --border: #e0e0e0;
  --grey: #a0a0a0;
  --fade: #3e3e3e;
  --material: #1e1e1e;
  --dark: #101010;
  --black: #000000;
  --primary: #ecae00;
  --blue: #3b87f2;

  --ground: var(--white);
  --panel: var(--light);
  --inner: var(--white);
  --text: var(--black);
  --muted: #6f6f6f;
  --line: var(--border);
  --radius: 20px;
  --nav: 70px;
  --ease: cubic-bezier(.2, 0, 0, 1);
  --bounce: cubic-bezier(.34, 1.56, .64, 1);
  --quick: .16s;
  --standard: .32s;
  --slow: .6s;
}
@media (prefers-color-scheme: dark) {
  :root { --ground: var(--dark); --panel: var(--material); --inner: var(--material); --text: var(--white); --muted: var(--grey); --line: var(--fade); }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--text); font-family: "Nunito", "SF Pro Rounded", system-ui, sans-serif; font-weight: 700; line-height: 1.5; font-size: 16px; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(38px, 7vw, 68px); font-weight: 900; line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 900; line-height: 1.1; letter-spacing: -0.01em; }
h3 { font-size: 26px; font-weight: 900; line-height: 1.1; }
.lead { font-size: 18px; color: var(--muted); max-width: 560px; text-wrap: pretty; }
.wrap { width: min(1000px, 100% - 32px); margin: 0 auto; }
section { padding: 40px 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; height: var(--nav); background: color-mix(in srgb, var(--ground) 85%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.nav .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mark { display: block; width: 104px; height: 26px; background: currentColor; -webkit-mask: url(/assets/codea.svg) center / contain no-repeat; mask: url(/assets/codea.svg) center / contain no-repeat; }
.links { display: flex; gap: 6px; align-items: center; }
.links a { padding: 8px 14px; border-radius: 999px; font-weight: 800; color: var(--muted); transition: color var(--quick) var(--ease), background-color var(--quick) var(--ease); }
.links a:hover { color: var(--text); background: var(--panel); }

/* hero */
.hero { padding: 80px 0 30px; }
.hero .wrap { display: grid; gap: 20px; }

/* the apps: one card each, tinted by --accent */
.apps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.apps > *, .mails > *, .app > * { min-width: 0; }
.app { --accent: var(--primary); position: relative; display: grid; gap: 16px; align-content: start; grid-template-rows: auto auto 1fr auto; padding: 28px; border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 9%, var(--inner)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); transition: transform var(--standard) var(--ease), box-shadow var(--standard) var(--ease), border-color var(--standard) var(--ease); }
.app.blue { --accent: var(--blue); }
.app:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 22px 36px -24px color-mix(in srgb, var(--accent) 80%, transparent); }
.app:active { transform: translateY(-1px) scale(.99); }
.app .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.app .logo { width: 84px; height: 84px; border-radius: 22.5%; flex: none; transition: transform var(--standard) var(--bounce); box-shadow: 0 10px 20px -12px color-mix(in srgb, var(--accent) 90%, transparent); }
.app:hover .logo { transform: rotate(-5deg) scale(1.06); }
.app p { color: var(--muted); text-wrap: pretty; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.pill { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, var(--inner)); color: var(--text); font-size: 12px; font-weight: 900; white-space: nowrap; }
.pill.solid { background: var(--accent); color: var(--white); }
.kind { font-size: 13px; font-weight: 900; color: var(--muted); margin-bottom: 4px; }
.btn { justify-self: start; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 999px; background: var(--accent); color: var(--white); font-weight: 900; white-space: nowrap; }
.btn::after { content: "→"; transition: transform var(--standard) var(--bounce); }
.app:hover .btn::after { transform: translateX(4px); }

/* contact */
.panel { background: var(--panel); border-radius: var(--radius); padding: 28px; display: grid; gap: 18px; }
.mails { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.mail { display: grid; gap: 2px; padding: 16px 18px; border-radius: 16px; background: var(--inner); border: 1px solid var(--line); transition: transform var(--standard) var(--ease), border-color var(--standard) var(--ease); }
.mail:hover { transform: translateY(-2px); border-color: var(--text); }
.mail small { font-size: 12px; font-weight: 900; color: var(--muted); }
.mail span { font-weight: 900; overflow-wrap: anywhere; }

/* footer */
footer { border-top: 1px solid var(--line); margin-top: 30px; padding: 28px 0; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
footer .mark { width: 80px; height: 20px; }
footer .row { display: flex; align-items: center; gap: 12px; }
footer .links a { padding: 6px 10px; }

/* entrance: the pieces rise once as the page lands */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero .wrap > *, .apps > *, .panel { animation: rise var(--slow) var(--ease) both; }
.hero .wrap > :nth-child(2) { animation-delay: .08s; }
.apps > :nth-child(1) { animation-delay: .16s; }
.apps > :nth-child(2) { animation-delay: .24s; }
.panel { animation-delay: .32s; }
@media (prefers-reduced-motion: reduce) { *, *::after { animation: none !important; transition: none !important; } }
