/* ============================================================
   Ellabyte Ltd — Portfolio Site
   Apple-inspired minimal design
   ============================================================ */

/* ---- Self-hosted fonts ---- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/Inter-Latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- Custom Properties (Design Tokens) ---- */
:root {
  /* Colours — Light Mode */
  --color-bg:           #ffffff;
  --color-bg-secondary: #f5f5f7;
  --color-bg-tertiary:  #e8e8ed;
  --color-surface:      #ffffff;
  --color-surface-raised: #ffffff;
  --color-border:       rgba(0,0,0,0.1);
  --color-text:         #1d1d1f;
  --color-text-secondary: #6e6e73;
  --color-text-tertiary:  #aeaeb2;
  --color-accent:       #0071e3;        /* Apple blue */
  --color-accent-hover: #0077ed;
  --color-accent-subtle: rgba(0,113,227,0.08);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display',
               'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Sizes */
  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.875rem;   /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-md:   1.125rem;   /* 18px */
  --text-lg:   1.375rem;   /* 22px */
  --text-xl:   1.75rem;    /* 28px */
  --text-2xl:  2.25rem;    /* 36px */
  --text-3xl:  3rem;       /* 48px */
  --text-4xl:  4rem;       /* 64px */
  --text-5xl:  5.5rem;     /* 88px */

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Shape */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Shadow */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.1), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-xl:  0 40px 100px rgba(0,0,0,0.12);

  /* Transitions */
  --transition-fast:   150ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-base:   300ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-slow:   600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Layout */
  --nav-height: 60px;
  --container:  1120px;
}

/* ---- Dark Mode ---- */
[data-theme="dark"] {
  --color-bg:            #000000;
  --color-bg-secondary:  #1c1c1e;
  --color-bg-tertiary:   #2c2c2e;
  --color-surface:       #1c1c1e;
  --color-surface-raised:#2c2c2e;
  --color-border:        rgba(255,255,255,0.1);
  --color-text:          #f5f5f7;
  --color-text-secondary:#98989d;
  --color-text-tertiary: #636366;
  --color-accent:        #2997ff;
  --color-accent-hover:  #409cff;
  --color-accent-subtle: rgba(41,151,255,0.12);
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.6);
  --shadow-xl:  0 40px 100px rgba(0,0,0,0.7);
}

/* Respect OS preference if no explicit toggle yet */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --color-bg:            #000000;
    --color-bg-secondary:  #1c1c1e;
    --color-bg-tertiary:   #2c2c2e;
    --color-surface:       #1c1c1e;
    --color-surface-raised:#2c2c2e;
    --color-border:        rgba(255,255,255,0.1);
    --color-text:          #f5f5f7;
    --color-text-secondary:#98989d;
    --color-text-tertiary: #636366;
    --color-accent:        #2997ff;
    --color-accent-hover:  #409cff;
    --color-accent-subtle: rgba(41,151,255,0.12);
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
    --shadow-lg:  0 20px 60px rgba(0,0,0,0.6);
    --shadow-xl:  0 40px 100px rgba(0,0,0,0.7);
  }
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-base), color var(--transition-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* iPhone notch / Dynamic Island safe areas (landscape) */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

img, video, svg {
  display: block;
  max-width: 100%;
}

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

ul { list-style: none; }

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.section {
  padding-block: var(--space-32);
}

.section__eyebrow {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.section__title {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.section__sub {
  font-size: var(--text-md);
  color: var(--color-text-secondary);
  max-width: 48ch;
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section__header .section__sub {
  margin-inline: auto;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,113,227,0.35);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--ghost {
  background: transparent;
  color: var(--color-accent);
  box-shadow: inset 0 0 0 1.5px var(--color-accent);
}

.btn--ghost:hover {
  background: var(--color-accent-subtle);
  transform: translateY(-1px);
}

.btn--app-store {
  background: transparent;
  color: var(--color-text);
  padding: 0;
  width: 140px;
  height: 42px;
}

.btn--app-store svg {
  width: 100%;
  height: 100%;
}

.app-store-badge .badge-bg {
  color: var(--color-text);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-base), border-color var(--transition-base);
}

[data-theme="dark"] .nav {
  background: rgba(0,0,0,0.72);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .nav {
    background: rgba(0,0,0,0.72);
  }
}

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-md);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.nav__logo:hover { opacity: 0.7; }

.logo__mark {
  font-size: 1.4rem;
  color: var(--color-accent);
  line-height: 1;
}

.logo__text {
  color: var(--color-text);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.nav__link:hover { color: var(--color-text); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Theme toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  background: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  position: relative;
}

.theme-toggle:hover {
  background: var(--color-bg-tertiary);
  color: var(--color-text);
  border-color: var(--color-text-tertiary);
}

.theme-toggle__icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

/* Light mode: show sun, hide moon */
[data-theme="light"] .theme-toggle__icon--light,
html:not([data-theme]) .theme-toggle__icon--light {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

[data-theme="light"] .theme-toggle__icon--dark,
html:not([data-theme]) .theme-toggle__icon--dark {
  opacity: 0;
  transform: scale(0.6) rotate(-30deg);
}

/* Dark mode: hide sun, show moon */
[data-theme="dark"] .theme-toggle__icon--light {
  opacity: 0;
  transform: scale(0.6) rotate(30deg);
}

[data-theme="dark"] .theme-toggle__icon--dark {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-toggle__icon--light {
    opacity: 0;
    transform: scale(0.6) rotate(30deg);
  }
  html:not([data-theme="light"]) .theme-toggle__icon--dark {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* Hamburger */
.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

.nav__burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-text);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  transform-origin: center;
}

.nav__burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav__burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity var(--transition-base), transform var(--transition-base);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--nav-height) var(--space-6) var(--space-8);
}

.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mobile-menu ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
  margin-top: auto;
  margin-bottom: auto;
}

.mobile-menu__link {
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
  transition: color var(--transition-fast);
}

.mobile-menu__link:hover { color: var(--color-accent); }

/* ============================================================
   NAV — logo (SVG mark + wordmark)
   ============================================================ */

/* Nav logo mark (inline SVG) */
.nav__logo-img {
  display: block;
  height: 38px;
  width: auto;
  color: #1a1f3a;
  transition: opacity var(--transition-fast);
}
[data-theme="dark"] .nav__logo-img { color: #f5f5f7; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .nav__logo-img { color: #f5f5f7; }
}
.nav__logo:hover .nav__logo-img { opacity: 0.75; }

/* Nav logo combined SVG (sub-pages) */
.nav__logo-svg {
  display: block;
  height: 38px;
  width: auto;
  color: #1a1f3a;
  transition: opacity var(--transition-fast);
}
[data-theme="dark"] .nav__logo-svg { color: #f5f5f7; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .nav__logo-svg { color: #f5f5f7; }
}
.nav__logo:hover .nav__logo-svg { opacity: 0.75; }

/* Nav wordmark */
.nav__logo-wordmark {
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: #1d1d1f;
  transition: opacity var(--transition-fast);
}
[data-theme="dark"] .nav__logo-wordmark { color: #f5f5f7; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .nav__logo-wordmark { color: #f5f5f7; }
}
.nav__logo:hover .nav__logo-wordmark { opacity: 0.75; }

/* Footer logo */
.footer__logo {
  margin-bottom: var(--space-2);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.footer__logo-img {
  display: block;
  height: 34px;
  width: auto;
  color: #1a1f3a;
}
[data-theme="dark"] .footer__logo-img { color: #f5f5f7; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .footer__logo-img { color: #f5f5f7; }
}

/* Footer wordmark */
.footer__logo-wordmark {
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: #1d1d1f;
}
[data-theme="dark"] .footer__logo-wordmark { color: #f5f5f7; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .footer__logo-wordmark { color: #f5f5f7; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

.hero__inner {
  position: relative;
  z-index: 1;
  padding-block: var(--space-20);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-16);
  align-items: center;
}

/* ---- Text side ---- */
.hero__content {
  min-width: 0;
}

.hero__eyebrow {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-6);
}

.hero__headline {
  font-size: clamp(var(--text-3xl), 5.5vw, var(--text-5xl));
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.0;
  color: var(--color-text);
  margin-bottom: var(--space-6);
}

.hero__headline--accent {
  background: linear-gradient(135deg, var(--color-accent) 0%, #5e5ce6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__sub {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  font-weight: 400;
  line-height: 1.5;
  max-width: 48ch;
  margin-bottom: var(--space-10);
}

.hero__cta {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ---- Phone side ---- */
.hero__phone {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* The wrapper div carries the tilt, shadow & float — never the SVG directly.
   This keeps the SVG rendering at native vector resolution in Safari. */
.hero__phone-img {
  width: clamp(200px, 26vw, 300px);
  /* Tilt: Apple product-page style */
  transform: rotate(4deg) perspective(1200px) rotateY(-6deg);
  filter: drop-shadow(0 32px 64px rgba(10,132,255,0.22))
          drop-shadow(0 8px 24px rgba(0,0,0,0.4));
  transition: transform var(--transition-slow), filter var(--transition-slow);
  will-change: transform;
  animation: phoneFloat 8s ease-in-out infinite;
}

.hero__phone:hover .hero__phone-img {
  transform: rotate(2deg) perspective(1200px) rotateY(-3deg) translateY(-8px);
  filter: drop-shadow(0 48px 80px rgba(10,132,255,0.28))
          drop-shadow(0 12px 32px rgba(0,0,0,0.45));
}

/* The SVG itself — fills the wrapper, no extra transforms applied to it */
.hero__phone-svg {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes phoneFloat {
  0%, 100% { transform: rotate(4deg) perspective(1200px) rotateY(-6deg) translateY(0px); }
  50%       { transform: rotate(4deg) perspective(1200px) rotateY(-6deg) translateY(-14px); }
}

/* Decorative blobs */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero__blob {
  position: absolute;
  border-radius: var(--radius-full);
  filter: blur(80px);
  opacity: 0.12;
  animation: float 14s ease-in-out infinite;
}

[data-theme="dark"] .hero__blob { opacity: 0.18; }

.hero__blob--1 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, #0071e3 0%, #5e5ce6 60%, transparent 100%);
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.hero__blob--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #5e5ce6 0%, #bf5af2 60%, transparent 100%);
  bottom: -100px;
  left: -50px;
  animation-delay: -7s;
}

@keyframes float {
  0%, 100% { transform: translate(0,  0) scale(1); }
  33%       { transform: translate(20px, -30px) scale(1.05); }
  66%       { transform: translate(-15px, 20px) scale(0.97); }
}

.break-lg { display: none; }

/* ============================================================
   APPS SECTION
   ============================================================ */
.apps { background: var(--color-bg-secondary); }

.apps__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 480px), 1fr));
  gap: var(--space-6);
}

/* App Card */
.app-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.app-card--placeholder {
  border: 1.5px dashed var(--color-border);
  box-shadow: none;
}

.app-card--coming-soon {
  background: var(--color-bg-secondary);
  border: 1.5px dashed var(--color-border);
  box-shadow: none;
  min-height: 260px;
  justify-content: center;
  align-items: center;
}

/* App card header: icon + text side by side */
.app-card__header {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--space-4);
}

/* App icon */
.app-card__icon { flex-shrink: 0; }

.app-icon-img {
  width: 72px;
  height: 72px;
  border-radius: 16px; /* iOS-style squircle corner */
  display: block;
  object-fit: cover;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.app-icon-placeholder {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  background: var(--color-accent-subtle);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed var(--color-border);
}

.app-card__name {
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.app-card__category {
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.app-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* Screenshots row */
.app-card__screenshots {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-2);
  scrollbar-width: none;
}

.app-card__screenshots::-webkit-scrollbar { display: none; }

.screenshot-placeholder {
  flex-shrink: 0;
  width: 120px;
  height: 220px;
  border-radius: var(--radius-md);
  background: var(--color-bg-secondary);
  border: 1.5px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  color: var(--color-text-tertiary);
  font-size: var(--text-xs);
  font-weight: 500;
}

/* Real screenshots — use this class on <img> elements */
.app-screenshot {
  flex-shrink: 0;
  width: 120px;
  height: 220px;
  border-radius: var(--radius-md);
  object-fit: cover;
  scroll-snap-align: start;
  box-shadow: var(--shadow-sm);
}

/* App card footer (QR + download) */
.app-card__footer {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-tertiary);
}

.qr-placeholder span {
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Real QR code image — use this class on <img> elements */
.app-card__qr-img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
}

/* Coming soon card centred content */
.app-card__body--centered {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.coming-soon__icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--color-bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary);
}

/* ============================================================
   WEB DESIGN SECTION
   ============================================================ */
.web-design { background: var(--color-bg); }

.web-design__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 480px), 1fr));
  gap: var(--space-6);
}

/* Web project card */
.web-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.web-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.web-card--coming-soon {
  background: var(--color-bg-secondary);
  border: 1.5px dashed var(--color-border);
  box-shadow: none;
  min-height: 260px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.web-card--coming-soon:hover {
  transform: none;
  box-shadow: none;
}

/* Preview area */
.web-card__preview {
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
}

.web-card__preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-16) var(--space-8);
  color: var(--color-text-tertiary);
}

.web-card__preview-placeholder span {
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.web-card__preview img {
  display: block;
  width: 100%;
  height: auto;
}

/* Card body */
.web-card__body {
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.web-card__name {
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.web-card__category {
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}

.web-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

.web-card__actions {
  display: flex;
  gap: var(--space-3);
}

/* Small button variant */
.btn--sm {
  padding: 0.5rem 1.15rem;
  font-size: var(--text-sm);
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about { background: var(--color-bg); }

.about__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-20);
  align-items: center;
}

.about__body {
  font-size: var(--text-md);
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-5);
}

.about__values {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-top: var(--space-8);
}

.value {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.value__icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-size: var(--text-base);
  margin-top: 2px;
}

.value strong {
  display: block;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.value p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* Device illustration */
.about__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about__device {
  perspective: 1200px;
}

.device-frame {
  width: 280px;
  height: 540px;
  background: var(--color-bg-secondary);
  border: 2px solid var(--color-border);
  border-radius: 44px;
  padding: 18px;
  box-shadow: var(--shadow-xl);
  transform: rotateY(-8deg) rotateX(4deg);
  transition: transform var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.device-frame::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 6px;
  background: var(--color-border);
  border-radius: var(--radius-full);
}

.about__device:hover .device-frame {
  transform: rotateY(-2deg) rotateX(2deg);
}

.device-screen {
  width: 100%;
  height: 100%;
  background: var(--color-bg-tertiary);
  border-radius: 32px;
  overflow: hidden;
  padding: var(--space-6) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-10);
}

.code-lines {
  display: flex;
  flex-direction: column;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  overflow: hidden;
}

.code-lines span {
  display: block;
  white-space: pre;
  opacity: 0.85;
  padding-left: calc(var(--indent, 0) * 14px);
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
}

/* Swift syntax colouring */
.code-lines .kw  { color: #fc6eb2; } /* keywords: import, struct, var, some */
.code-lines .ty  { color: #5ac8fa; } /* types: SwiftUI, View, VStack, Text  */
.code-lines .st  { color: #fc9a3e; } /* strings                              */
.code-lines .mt  { color: #a8d8a8; } /* modifiers: .font, .largeTitle        */
.code-lines .cm  { color: #636366; font-style: italic; } /* comments         */
.code-lines .br  { color: #8e8e93; } /* brackets / punctuation              */

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact {
  background: var(--color-bg-secondary);
  text-align: center;
}

.contact__inner {
  max-width: 600px;
  margin-inline: auto;
}

.contact__sub {
  font-size: var(--text-md);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
  margin-top: var(--space-4);
}

.contact__email {
  display: inline-block;
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-accent);
  text-decoration: none;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  background: var(--color-accent-subtle);
  transition: all var(--transition-fast);
  margin-bottom: var(--space-10);
  word-break: break-all;
}

.contact__email:hover {
  background: var(--color-accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,113,227,0.3);
}

.contact__socials {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.social-link:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.contact__note {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  font-style: italic;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-12);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
}

.footer__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

.footer__copy {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.footer__small {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}

.footer__privacy-link {
  color: var(--color-text-tertiary);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.footer__privacy-link:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.footer__credit {
  margin-top: var(--space-1);
}

/* ============================================================
   ANIMATIONS — entrance reveals
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-stagger.is-visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0ms; }
.reveal-stagger.is-visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 80ms; }
.reveal-stagger.is-visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 160ms; }
.reveal-stagger.is-visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 240ms; }
.reveal-stagger.is-visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 320ms; }
.reveal-stagger.is-visible > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 400ms; }

/* ============================================================
   RESPONSIVE — TABLET (≤ 900px)
   ============================================================ */
@media (max-width: 900px) {
  .section__title { font-size: var(--text-2xl); }

  .nav__links { display: none; }
  .nav__burger { display: flex; }

  /* Hero: stack vertically on tablet, phone goes below */
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding-block: var(--space-16) var(--space-8);
    gap: var(--space-12);
  }

  .hero__sub { max-width: 100%; margin-inline: auto; }
  .hero__cta { justify-content: center; }

  .hero__phone {
    justify-content: center;
  }

  .hero__phone-img {
    width: clamp(160px, 42vw, 240px);
    transform: none;
    animation: phoneFloatSimple 8s ease-in-out infinite;
  }

  .hero__phone:hover .hero__phone-img {
    transform: translateY(-6px);
  }

  @keyframes phoneFloatSimple {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-10px); }
  }

  .about__inner {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .about__visual { order: -1; }

  .device-frame {
    width: 200px;
    height: 380px;
    border-radius: 36px;
  }

  .code-lines {
    font-size: 9px;
  }

  .hero__headline { font-size: clamp(var(--text-2xl), 9vw, var(--text-3xl)); }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤ 600px)
   ============================================================ */
@media (max-width: 600px) {
  :root {
    --space-32: 4rem;
    --space-20: 3rem;
  }

  .container { padding-inline: var(--space-5); }

  .section { padding-block: var(--space-20); }
  .section__title { font-size: var(--text-xl); }
  .section__eyebrow { font-size: var(--text-xs); }

  .hero__sub { font-size: var(--text-base); }
  .hero__cta { flex-direction: column; align-items: center; }

  .hero__phone-img { width: clamp(140px, 52vw, 200px); animation: none; }

  .apps__grid { grid-template-columns: 1fr; }
  .web-design__grid { grid-template-columns: 1fr; }

  .about__visual { display: none; }

  .app-card__footer { flex-direction: column; align-items: flex-start; }

  .contact__email { font-size: var(--text-lg); }
  .contact__socials { gap: var(--space-4); }
  .social-link { font-size: var(--text-xs); }

  .nav__logo-img    { height: 28px; }
  .nav__logo-svg    { height: 28px; }
  .footer__logo-img { height: 26px; }
}

@media (min-width: 900px) {
  .break-lg { display: block; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .nav, .hero__bg, .theme-toggle, .nav__burger { display: none; }
  body { color: #000; background: #fff; }
}

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.12);

  /* Hidden by default — JS adds .cookie-banner--visible */
  transform: translateY(110%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  /* Ensure it always renders on top regardless of stacking contexts */
  isolation: isolate;
  will-change: transform;
}

.cookie-banner--visible {
  transform: translateY(0) !important;
}

.cookie-banner__text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.5;
}

.cookie-banner__link {
  color: var(--color-accent);
  text-decoration: none;
  white-space: nowrap;
}
.cookie-banner__link:hover { text-decoration: underline; }

.cookie-banner__actions {
  display: flex;
  gap: var(--space-3);
  flex-shrink: 0;
}

.cookie-banner__btn {
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.cookie-banner__btn:hover  { opacity: 0.85; transform: translateY(-1px); }
.cookie-banner__btn:active { transform: translateY(0); }

.cookie-banner__btn--decline {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.cookie-banner__btn--accept {
  background: var(--color-accent);
  color: #fff;
}

@media (max-width: 600px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
  }
  .cookie-banner__actions { width: 100%; justify-content: flex-end; }
}
