/* =========================================================
   DailyFlutterUI — Clean & Simple Light Theme
   ========================================================= */

:root {
  --bg:        #ffffff;
  --bg-soft:   #f7f7f9;
  --surface:   #ffffff;
  --surface-2: #f2f2f5;
  --border:    #e8e8ee;
  --border-2:  #d9d9e2;
  --text:      #111114;
  --muted:     #5c5f6b;
  --faint:     #8b8e9a;
  --accent:    #1161a5;
  --accent-2:  #3b8bd6;
  --accent-soft: rgba(17, 97, 165, 0.10);
  --accent-glow: rgba(17, 97, 165, 0.35);
  --dark:      #18181b;
  --radius:    16px;
  --radius-lg: 22px;
  --radius-sm: 11px;
  --maxw:      1100px;
  --shadow:    0 1px 2px rgba(17,17,20,.05), 0 12px 28px -14px rgba(17,17,20,.14);
  --ease:      cubic-bezier(.21, .8, .35, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

h1, h2, h3 { font-family: 'Sora', sans-serif; line-height: 1.12; letter-spacing: -0.03em; font-weight: 800; color: var(--text); }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.accent {
  background: linear-gradient(100deg, var(--accent) 20%, var(--accent-2) 50%, var(--accent) 80%);
  background-size: 220% auto;
  background-clip: text; -webkit-background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: shimmer 6s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

/* ---------- Buttons ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 600; font-size: .95rem; padding: .82rem 1.5rem;
  border-radius: 10px; transition: transform .3s var(--ease), background .25s, border-color .25s, color .25s, box-shadow .3s var(--ease);
  white-space: nowrap; border: 1px solid transparent;
}
.btn::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  background-size: 220% 100%; background-position: 120% 0;
  transition: background-position .7s var(--ease); pointer-events: none;
}
.btn:hover::before { background-position: -20% 0; }
.btn--sm { padding: .55rem 1.05rem; font-size: .88rem; }
.btn--block { width: 100%; }
.btn--primary { background: var(--dark); color: #fff; }
.btn--primary:hover { background: #000; transform: translateY(-3px); box-shadow: 0 14px 28px -10px rgba(0,0,0,.4); }
.btn--primary:active { transform: translateY(-1px); }
.btn--ghost { border-color: var(--border-2); color: var(--text); background: #fff; }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 14px 28px -12px var(--accent-glow); }
.btn--ghost:active { transform: translateY(-1px); }
.btn svg { width: 17px; height: 17px; }

/* ---------- Navbar ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 0; transition: background .3s, padding .3s, border-color .3s, box-shadow .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border); padding: 11px 0;
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: 'Sora'; font-weight: 700; font-size: 1.1rem; letter-spacing: -.02em; transition: opacity .25s var(--ease); }
.brand:hover { opacity: .75; }
.brand__mark {
  display: grid; place-items: center; width: 30px; height: 30px;
  color: #fff; background: var(--accent); border-radius: 8px; font-size: .78rem; font-weight: 700;
}
.nav__links { display: flex; align-items: center; gap: .2rem; }
.nav__links a:not(.btn) {
  position: relative; color: var(--muted); font-weight: 500; font-size: .94rem;
  padding: .5rem .85rem; transition: color .2s;
}
.nav__links a:not(.btn)::after {
  content: ''; position: absolute; left: .85rem; right: .85rem; bottom: .15rem; height: 2px;
  background: var(--accent); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.nav__links a:not(.btn):hover { color: var(--text); }
.nav__links a:not(.btn):hover::after,
.nav__links a:not(.btn).active::after { transform: scaleX(1); }
.nav__links a:not(.btn).active { color: var(--text); }
.nav__links .btn { margin-left: .5rem; }

/* simple blue "BUY NOW" text link in the navbar */
.nav__links a.nav__buy { color: var(--accent); font-weight: 600; }
.nav__links a.nav__buy:hover { color: var(--accent); }

.nav__toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav__toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s var(--ease); }
.nav__toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.active span:nth-child(2) { opacity: 0; }
.nav__toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Sections ---------- */
.section { padding: 100px 0; position: relative; }
section[id] { scroll-margin-top: 80px; }   /* keep titles clear of the fixed navbar */
.section--alt { background: var(--bg-soft); border-block: 1px solid var(--border); }
.section__head { max-width: 600px; margin: 0 auto 56px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  color: var(--accent); margin-bottom: 1rem;
  background: var(--accent-soft); padding: .35rem .8rem; border-radius: 999px;
}
.section__title { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
.section__lead { color: var(--muted); margin-top: 1rem; font-size: 1.05rem; }

.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- Hero ---------- */
.hero { padding-top: 150px; padding-bottom: 90px; }
.hero__inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero__greet {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: 1rem; color: var(--muted); font-weight: 500; margin-bottom: 1.1rem;
}
.hero__greet .wave { font-size: 1.15rem; }

.hero__title { font-size: clamp(2.6rem, 6vw, 4.2rem); letter-spacing: -.035em; }
.hero__sub { color: var(--muted); font-size: 1.12rem; margin-top: 1.4rem; max-width: 460px; line-height: 1.7; }
.hero__sub strong { color: var(--text); font-weight: 600; }
.hero__cta { display: flex; gap: .8rem; margin-top: 2.2rem; flex-wrap: wrap; }


/* Hero visual — circular framed photo with accent ring */
.hero__visual { display: flex; justify-content: center; }
.photo {
  position: relative;
  width: min(280px, 70vw); aspect-ratio: 1 / 1; border-radius: 50%;
  overflow: hidden; padding: 6px;
  border: 2px solid var(--accent);
  background: var(--bg);
  animation: float 5s ease-in-out infinite;
  box-shadow: 0 0 0 0 var(--accent-glow);
  transition: box-shadow .4s var(--ease);
}
.photo::after {
  content: ''; position: absolute; inset: -10px; border-radius: 50%;
  border: 1px solid var(--accent-soft);
  animation: pulse-ring 3s ease-out infinite;
}
.photo:hover { box-shadow: 0 0 32px 4px var(--accent-glow); }
.photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; transition: transform .5s var(--ease); }
.photo:hover img { transform: scale(1.06); }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes pulse-ring {
  0% { transform: scale(.94); opacity: .8; }
  100% { transform: scale(1.12); opacity: 0; }
}

/* ---------- Card base ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: transform .35s var(--ease), border-color .3s, box-shadow .35s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px -18px var(--accent-glow), 0 4px 14px -4px rgba(17,17,20,.1);
}

/* Portfolio video card */
.video-card { padding: 0; overflow: hidden; }
.video-card__thumb {
  position: relative; aspect-ratio: 16/10; background: var(--surface-2);
  display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--border);
}
.video-card__thumb video,
.video-card__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb-empty { position: relative; z-index: 1; font-size: .82rem; color: var(--faint); letter-spacing: .02em; }
.play-btn {
  position: relative; z-index: 2; width: 56px; height: 56px; border-radius: 50%;
  background: var(--dark); color: #fff; display: grid; place-items: center;
  transition: transform .25s var(--ease); box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.play-btn svg { width: 20px; height: 20px; margin-left: 2px; }
.video-card:hover .play-btn { transform: scale(1.08); }
.video-card__body { padding: 22px 24px 24px; }
.video-card__body h3 { font-size: 1.1rem; }
.video-card__body p { color: var(--muted); font-size: .92rem; margin-top: .4rem; }
.tags { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: 1.1rem; }
.tag { font-size: .74rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); padding: .25rem .65rem; border-radius: 7px; }

/* UI showcase — app screens, 4 per row */
.ui-group + .ui-group { margin-top: 56px; }
.ui-group__title { font-family: 'Sora'; font-size: 1.3rem; font-weight: 700; margin-bottom: 1.4rem; }
.ui-grid { display: grid; gap: 22px; grid-template-columns: repeat(4, 1fr); }
.ui-shot {
  aspect-ratio: 1320 / 2868;        /* the screenshots' native phone ratio */
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-2);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
}
.ui-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.ui-shot { cursor: zoom-in; }
.ui-shot:hover { transform: translateY(-8px); border-color: var(--accent); box-shadow: 0 18px 34px -16px var(--accent-glow); }
.ui-shot:hover img { transform: scale(1.05); }
.ui-shot:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* screens past the first row-pair, revealed by the "Show all" toggle */
.ui-shot.is-extra { display: none; }
.ui-grid.is-expanded .ui-shot.is-extra { display: block; }
.ui-group__more { display: flex; margin: 28px auto 0; }

@media (max-width: 960px) { .ui-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .ui-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  background: rgba(12, 12, 16, .88); backdrop-filter: blur(6px);
  padding: 32px 20px;
}
.lightbox.open { display: flex; }
.lightbox__img {
  max-width: min(92vw, 420px); max-height: 88vh; width: auto; height: auto;
  border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.lightbox__close,
.lightbox__nav {
  position: absolute; color: #fff; background: rgba(255,255,255,.12);
  border-radius: 50%; display: grid; place-items: center;
  transition: background .2s var(--ease);
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255,255,255,.26); }
.lightbox__close { top: 20px; right: 20px; width: 42px; height: 42px; font-size: 1.7rem; line-height: 1; }
.lightbox__nav { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 2rem; line-height: 1; }
.lightbox__nav--prev { left: 22px; }
.lightbox__nav--next { right: 22px; }
.lightbox__count {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.75); font-size: .88rem; letter-spacing: .03em;
}
@media (max-width: 720px) {
  .lightbox__nav { width: 40px; height: 40px; font-size: 1.6rem; }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
}

/* Service card */
.service-card__icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 1.2rem;
}
.service-card__icon svg { width: 22px; height: 22px; }
.service-card h3 { font-size: 1.1rem; }
.service-card p { color: var(--muted); font-size: .93rem; margin-top: .55rem; line-height: 1.65; }

/* ---------- Project card (real shipped apps) ---------- */
/* Flexible grid: fills the row no matter how many apps (no lone trailing card) */
.projects-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.project-card { padding: 0; overflow: hidden; }
.project-card__media {
  position: relative; aspect-ratio: 4 / 5; background: var(--surface-2);
  display: grid; place-items: center; overflow: hidden;
}
.project-card__media img { width: 100%; height: 100%; object-fit: cover; }
/* App Store screenshot pulled automatically — float it on a soft background */
.project-card__media.is-shot { background: linear-gradient(160deg, #eef3f9 0%, #dde7f1 100%); }
.project-card__media.is-shot img {
  width: auto; height: 90%; max-width: 84%; object-fit: contain;
  border-radius: 16px; box-shadow: 0 16px 32px -12px rgba(17,17,20,.5);
}
/* Fallback to the app icon — float it like an iOS app icon */
.project-card__media.is-icon { background: linear-gradient(160deg, #eef3f9 0%, #dde7f1 100%); }
.project-card__media.is-icon img {
  width: auto; height: 68%; aspect-ratio: 1; object-fit: cover;
  border-radius: 22%; box-shadow: 0 14px 30px -10px rgba(17,17,20,.45);
}
/* lettered fallback when the screenshot is missing */
.project-card__media.no-img::after {
  content: attr(data-initial);
  font-family: 'Sora'; font-weight: 800; font-size: 3rem; color: var(--accent);
  background: var(--accent-soft); width: 100%; height: 100%; display: grid; place-items: center;
}
.project-card__body { padding: 22px 24px 24px; }
.project-card__body h3 { font-size: 1.15rem; }
.project-card__body p { color: var(--muted); font-size: .93rem; margin-top: .3rem; }

.store-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.2rem; }
/* Official store badges (real coloured images) */
.store-badge { display: inline-flex; transition: transform .2s var(--ease); }
.store-badge:hover { transform: translateY(-2px); }
.store-badge img { height: 42px; width: auto; display: block; }
/* Google's web badge has built-in padding — clip it so it visually matches Apple's height */
.store-badge--play { overflow: hidden; border-radius: 8px; }
.store-badge--play img { height: 60px; margin: -9px; }

/* ---------- Contact CTA ---------- */
.cta {
  text-align: center; max-width: 640px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 56px 40px; box-shadow: var(--shadow);
}
.cta__title { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
.cta__sub { color: var(--muted); margin-top: 1rem; font-size: 1.05rem; }
.cta__actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }

/* ---------- Contact ---------- */
.contact-card {
  display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 48px;
  box-shadow: var(--shadow);
}
.contact-card .section__title { text-align: left; }
.contact-list { margin: 1.8rem 0; display: grid; gap: 1rem; }
.contact-list li { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .96rem; }
.contact-list li svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.socials { display: flex; gap: .6rem; }
.socials a {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--muted); transition: .2s var(--ease);
}
.socials a svg { width: 18px; height: 18px; }
.socials a:hover { color: var(--text); border-color: var(--border-2); transform: translateY(-2px); }

.contact-form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .45rem; }
.field label { font-size: .84rem; color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; padding: .82rem 1rem; border-radius: var(--radius-sm);
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
  font-family: inherit; font-size: .95rem; transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { resize: vertical; }
.form-status { font-size: .9rem; min-height: 1.2rem; }
.form-status.ok { color: #16a34a; }
.form-status.err { color: #dc2626; }

/* ---------- Buy Now ---------- */
.section__cta { margin-top: 1.8rem; }
.showcase__foot {
  margin-top: 48px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 1.1rem;
}
.showcase__foot p { color: var(--muted); font-size: 1.05rem; }

/* PayPal's hosted button draws its own product card (title, price, bullets,
   buttons) as real DOM in this page — not an iframe. So this wrapper stays
   undecorated (no border/background/centering to fight it) and just gives the
   card a comfortable width to sit in. */
.buy__card {
  width: 460px; max-width: 100%; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 34px 32px;
}
.buy__card > div { width: 100%; }

/* PayPal lays the card's title and price out side by side, but drops them to
   a stack via a container query below 47rem — and our card is narrower than
   that. Force the row back so the price sits right-aligned beside the title.
   Only above 560px: on a phone there isn't room, and the price overflows the
   card. Below that we let PayPal's own stacked layout stand.
   If PayPal ever renames these classes this just no-ops back to the stack. */
@media (min-width: 560px) {
  .buy__card .item-header { flex-direction: row !important; gap: 1.5rem !important; }
  .buy__card .item-header .item-title { max-width: calc(60% - .75rem) !important; }
  .buy__card .item-header .price-container { max-width: calc(40% - .75rem) !important; text-align: end !important; }
  .buy__card .item-header #price-label { justify-content: end !important; }
}

/* PayPal's card can push past our box on narrow screens — keep it contained */
.buy__card, .buy__card * { min-width: 0; max-width: 100%; }
.buy__card { padding: 34px 32px; }
@media (max-width: 560px) { .buy__card { padding: 26px 20px; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 40px 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer p { color: var(--faint); font-size: .88rem; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; bottom: 26px; right: 26px; z-index: 90;
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border-2); color: var(--text);
  box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transform: translateY(14px); transition: .3s var(--ease);
}
.to-top svg { width: 18px; height: 18px; }
.to-top:hover { background: var(--surface-2); }
.to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0; transform: translateY(28px) scale(.97); filter: blur(4px);
  transition: opacity .7s var(--ease), transform .8s var(--ease), filter .7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; filter: blur(0); }

/* ---------- Micro-interactions ---------- */
/* waving hand in the hero greeting */
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(16deg); }
  30% { transform: rotate(-8deg); }
  45% { transform: rotate(14deg); }
}
.hero__greet .wave { display: inline-block; transform-origin: 70% 80%; animation: wave 2.6s var(--ease) infinite; }

/* subtle zoom on project media when hovering the card */
.project-card__media img { transition: transform .45s var(--ease); }
.project-card:hover .project-card__media img { transform: scale(1.04); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; gap: 44px; text-align: center; }
  .hero__copy { order: 2; }
  .hero__visual { order: 1; }
  .hero__greet, .hero__cta { justify-content: center; }
  .hero__sub { margin-inline: auto; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .contact-card { grid-template-columns: 1fr; padding: 36px; }
  .contact-card .section__title { text-align: center; }
}

@media (max-width: 720px) {
  .nav__links {
    position: fixed; inset: 0 0 0 auto; width: min(80vw, 320px); height: 100dvh;
    flex-direction: column; align-items: flex-start; justify-content: center; gap: .5rem;
    background: rgba(255,255,255,.98); backdrop-filter: blur(18px);
    padding: 0 1.6rem; transform: translateX(100%); transition: transform .38s var(--ease);
    border-left: 1px solid var(--border);
  }
  .nav__links.open { transform: translateX(0); }
  .nav__links a:not(.btn) { font-size: 1.05rem; width: 100%; }
  .nav__links .btn { margin: .6rem 0 0; width: 100%; }
  .nav__toggle { display: flex; z-index: 101; }
  .section { padding: 72px 0; }
  .hero { padding-top: 130px; }
  .grid--3 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
