/* ============================================================================
   Photoyam tool-landing design system (light, committed brand-blue).
   Shared by /tools + every per-tool landing (convert, resize, crop, compress,
   rotate, flip, add-text, psd-viewer). Self-contained: no external assets.
   ========================================================================== */
:root {
  --bg: #eef3fb;
  --surface: #ffffff;
  --surface-2: #f5f8fd;
  --border: #dce4f0;
  --ink: #0f1b2d;
  --muted: #4f5d76;
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --brand-ink: #0a1a38;
  --ok: #0f766e;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, 0.06);
  --shadow-md: 0 12px 32px rgba(15, 27, 45, 0.10);
  --shadow-lg: 0 30px 70px rgba(37, 99, 235, 0.20);
  --maxw: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand-strong); }
img, svg { max-width: 100%; }

.page { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---- Top bar --------------------------------------------------------------*/
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0 8px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: -0.02em; font-size: 18px; }
.logo__mark { width: 30px; height: 30px; border-radius: 8px; flex: 0 0 auto; }
.topbar__links { display: flex; align-items: center; gap: 22px; font-size: 14.5px; font-weight: 600; }
.topbar__links a { color: var(--muted); text-decoration: none; }
.topbar__links a:hover { color: var(--ink); }
.topbar__cta { color: #fff !important; background: var(--brand); padding: 9px 16px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.topbar__cta:hover { background: var(--brand-strong); }
@media (max-width: 640px) { .topbar__links a:not(.topbar__cta) { display: none; } }

/* ---- Hero -----------------------------------------------------------------*/
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: 48px;
  padding: 46px 0 30px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -40px -10% auto -10%;
  height: 460px;
  background: radial-gradient(760px 340px at 22% 28%, rgba(37, 99, 235, 0.16), transparent 70%),
              radial-gradient(620px 360px at 92% 6%, rgba(59, 130, 246, 0.14), transparent 70%);
  z-index: -1;
  pointer-events: none;
}
.hero__copy { min-width: 0; }
.tag { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--brand-strong); background: #dfeaff; border: 1px solid #c4d8ff; border-radius: 999px; padding: 5px 13px; }
h1 {
  font-size: clamp(2.4rem, 5.6vw, 3.75rem);
  line-height: 1.04; margin: 18px 0 0; letter-spacing: -0.035em;
  font-weight: 820; text-wrap: balance;
}
h1 .acc { color: var(--brand); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); margin: 16px 0 0; max-width: 46ch; text-wrap: pretty; }

/* Drop / CTA */
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 28px 0 0; }
.drop {
  display: inline-flex; align-items: center; gap: 11px; cursor: pointer;
  background: var(--brand); color: #fff; font-size: 1rem; font-weight: 700;
  border: none; border-radius: 13px; padding: 15px 24px; box-shadow: var(--shadow-md);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.15s;
}
.drop:hover { background: var(--brand-strong); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.drop svg { width: 20px; height: 20px; }
.drop input { display: none; }
.cta__hint { font-size: 0.92rem; color: var(--muted); }
.cta__hint b { color: var(--ink); font-weight: 700; }
.ghostlink { font-size: 0.95rem; font-weight: 600; text-decoration: none; }
.ghostlink:hover { text-decoration: underline; }

.privacy-badge { display: inline-flex; align-items: center; gap: 8px; margin: 22px 0 0; padding: 8px 14px; font-size: 13px; font-weight: 700; color: var(--ok); background: #e7f7f1; border: 1px solid #a7ead6; border-radius: 999px; }
.privacy-badge svg { width: 15px; height: 15px; }

/* Format chips (converter hero) */
.formats { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; }
.chip { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; font-weight: 700; color: var(--brand-strong); background: #eaf1ff; border: 1px solid #cfe0ff; border-radius: 8px; padding: 5px 10px; }

/* Hero illustration */
.hero__art { position: relative; min-width: 0; }
.shot { width: 100%; height: auto; display: block; filter: drop-shadow(0 30px 55px rgba(15, 27, 45, 0.22)); border-radius: 16px; }
.shot--tilt { transform: rotate(-1.4deg); }

/* Body drag state: whole page is a drop target. */
body.is-dragging::after {
  content: 'Drop your image anywhere';
  position: fixed; inset: 14px; z-index: 50;
  display: grid; place-items: center;
  font-size: 1.4rem; font-weight: 800; color: var(--brand-strong);
  background: rgba(224, 236, 255, 0.86); border: 3px dashed var(--brand);
  border-radius: 24px; backdrop-filter: blur(2px); pointer-events: none;
}

/* ---- Section scaffold -----------------------------------------------------*/
.section { padding: 40px 0; }
.section__head { max-width: 40ch; }
.section h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.025em; margin: 0; font-weight: 800; text-wrap: balance; }
.section p.section__sub { color: var(--muted); margin: 12px 0 0; font-size: 1.05rem; }

/* Steps (a real ordered flow, so numbers carry meaning) */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin: 30px 0 0; }
.step { position: relative; padding: 4px 0 0; }
.step__n { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #dfeaff; color: var(--brand-strong); font-weight: 800; font-size: 1.05rem; }
.step h3 { margin: 14px 0 5px; font-size: 1.08rem; font-weight: 750; }
.step p { margin: 0; color: var(--muted); font-size: 0.96rem; }

/* Value props: asymmetric, not identical cards */
.props { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 28px 0 0; }
.prop { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.prop__ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 12px; }
.prop__ic svg { width: 22px; height: 22px; }
.prop h3 { margin: 0 0 6px; font-size: 1.06rem; font-weight: 750; }
.prop p { margin: 0; color: var(--muted); font-size: 0.96rem; }

/* ---- Privacy drench band --------------------------------------------------*/
.privacy-band { background: var(--brand-ink); color: #eaf1ff; border-radius: 28px; margin: 44px 0; padding: 0; overflow: hidden; }
.privacy-band__in { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 30px; align-items: center; padding: 42px clamp(24px, 4vw, 48px); }
.privacy-band h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.025em; margin: 0; font-weight: 820; }
.privacy-band p { color: #b9cdf0; margin: 14px 0 0; font-size: 1.05rem; max-width: 52ch; }
.privacy-band__art { display: grid; place-items: center; }
.privacy-band__art svg { width: 130px; height: 130px; }
@media (max-width: 720px) { .privacy-band__in { grid-template-columns: 1fr; } .privacy-band__art { order: -1; justify-items: start; } }

/* ---- Tools grid (hub + "more tools" strip) --------------------------------*/
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin: 30px 0 0; }
.tool-card { display: flex; gap: 15px; align-items: flex-start; text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), border-color 0.16s; }
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #b9caea; }
.tool-card__ic { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; }
.tool-card__ic svg { width: 25px; height: 25px; }
.tool-card__t { display: block; margin: 3px 0 5px; font-size: 1.08rem; font-weight: 780; color: var(--ink); }
.tool-card__d { display: block; margin: 0; color: var(--muted); font-size: 0.93rem; line-height: 1.5; }

/* Tools hub: centered hero */
.hub-hero { text-align: center; padding: 54px 0 14px; }
.hub-hero .tag { margin: 0 auto; }
.hub-hero h1 { margin: 18px auto 0; max-width: 15ch; }
.hub-hero .lead { margin: 16px auto 0; }
.hub-hero .cta { justify-content: center; }
.hub-hero .privacy-badge { margin-top: 22px; }

/* Compact tool nav (current highlighted) */
.toolnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 30px 0 0; }
.toolnav a { text-decoration: none; font-size: 13.5px; font-weight: 650; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px; transition: border-color 0.15s, color 0.15s, background 0.15s; }
.toolnav a:hover { border-color: var(--brand); color: var(--brand-strong); }
.toolnav a.is-current { background: var(--brand); color: #fff; border-color: var(--brand); cursor: default; }

/* ---- Footer ---------------------------------------------------------------*/
.foot { border-top: 1px solid var(--border); margin-top: 40px; padding: 28px 0 46px; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between; color: var(--muted); font-size: 0.92rem; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.foot__links { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---- Responsive -----------------------------------------------------------*/
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 30px; padding-top: 30px; }
  .hero__art { max-width: 520px; }
}

/* ---- Motion ---------------------------------------------------------------*/
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.reveal { animation: rise 0.7s var(--ease) both; }
.reveal-1 { animation-delay: 0.05s; }
.reveal-2 { animation-delay: 0.13s; }
.reveal-3 { animation-delay: 0.21s; }
.reveal-4 { animation-delay: 0.29s; }
.hero__art .shot { animation: rise 0.9s var(--ease) 0.18s both; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .hero__art .shot { animation: none; }
  .drop:hover, .tool-card:hover { transform: none; }
}
