/* N97 Design — portfolio website
   Design tokens per design_handoff_n97_portfolio/README.md */

:root {
  --turquoise: #7fc3c0;
  --gold: #cfb845;
  --ink: #141414;
  --paper: #f4f2ee;
  --paper-muted: #faf9f6;
  --line: #ddd8cd;
  --line-brand: #e2ded5;
  --text-secondary: #55524b;
  --text-tertiary: #7b776f;
  --text-tertiary-dark: #b9b5ab;
  --placeholder: #e8e4da;
  --placeholder-icon: #c9c4b7;
  --input-bg: #1e1e1e;
  --input-border: #333;
  --link: #1d7a76;
}

* { box-sizing: border-box; }

/* Proklik na kotvu nesmí zajet pod pevnou horní lištu */
[id] { scroll-margin-top: 100px; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Work Sans', sans-serif;
  font-weight: 400;
}

h1, h2, .heading-font {
  font-family: 'Instrument Sans', sans-serif;
}

p, h1, h2 {
  text-wrap: pretty;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover { color: var(--gold); }

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

.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 clamp(28px, 5vw, 140px);
}

/* Header — zůstává nahoře při scrollu, zmenší se do minimalistického pruhu */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 26px 28px;
  transition: padding 0.25s ease;
}
.logo-link {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
}
.logo-link svg {
  width: 58px;
  height: 58px;
  transition: width 0.25s ease, height 0.25s ease;
}
.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.logo-number {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  transition: font-size 0.25s ease;
}
.logo-subtitle {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  transition: opacity 0.2s ease, height 0.2s ease, font-size 0.25s ease;
}

/* Zmenšený stav po posunu dolů */
.site-header.is-scrolled .container {
  padding: 7px 28px;
  gap: 14px;
}
.site-header.is-scrolled .logo-link svg {
  width: 22px;
  height: 22px;
}
.site-header.is-scrolled .logo-number {
  font-size: 15px;
}
.site-header.is-scrolled .logo-subtitle {
  opacity: 0;
  height: 0;
  overflow: hidden;
}
.site-header.is-scrolled .main-nav {
  gap: 18px;
  font-size: 13px;
}
.site-header.is-scrolled .nav-cta {
  padding: 6px 14px;
}
.main-nav {
  display: flex;
  gap: 30px;
  align-items: center;
  font-size: 17px;
  font-weight: 500;
  transition: gap 0.25s ease, font-size 0.25s ease;
}
.main-nav a { color: var(--text-secondary); }
.main-nav a:hover { color: var(--ink); }
.nav-cta {
  background: var(--ink);
  color: var(--paper) !important;
  padding: 12px 22px;
  font-weight: 600;
  transition: padding 0.25s ease;
}
.nav-cta:hover { background: var(--gold); color: var(--ink) !important; }

/* Hamburger — jen na mobilu, otevírá rozbalovací navigaci */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 8px 28px 24px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a:not(.nav-cta) { width: 100%; padding: 12px 0; }
  .main-nav .nav-cta { width: fit-content; padding: 14px 24px; margin-top: 10px; }
}

/* Hero — tmavý gradient, tučný nadpis s akcentem, interaktivní lupa */
.hero {
  position: relative;
  overflow: hidden;
  padding: 150px 0 130px;
  min-height: 640px;
  display: flex;
  align-items: center;
  background:
    /* měkký tyrkysový přísvit, jen jedna barva místo zeleno-oranžové */
    radial-gradient(ellipse 900px 620px at 12% 15%, rgba(127, 195, 192, 0.28), transparent 60%),
    radial-gradient(ellipse 700px 520px at 88% 90%, rgba(127, 195, 192, 0.14), transparent 55%),
    var(--ink);
  color: var(--paper);
}

/* Animované čáry — postupně se kreslí a odmazávají, jedna zlatá jako v logu */
.hero-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.hl,
.hl-gold {
  fill: none;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  opacity: 0;
  animation: hl-draw 8s ease-in-out infinite;
}
.hl {
  stroke: var(--turquoise);
  stroke-width: 1;
}
.hl-gold {
  stroke: var(--gold);
  stroke-width: 2;
  animation-duration: 8s;
}
@keyframes hl-draw {
  0%   { stroke-dashoffset: 1; opacity: 0; }
  8%   { opacity: 0.18; }
  45%  { stroke-dashoffset: 0; opacity: 0.18; }
  65%  { stroke-dashoffset: 0; opacity: 0.18; }
  92%  { stroke-dashoffset: -1; opacity: 0; }
  100% { stroke-dashoffset: -1; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hl,
  .hl-gold {
    animation: none;
    stroke-dashoffset: 0;
    opacity: 0.12;
  }
  .hl-gold { opacity: 0.22; }
}

/* dva tenké kruhové obrysy — geometrický akcent, mimo text */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  border: 1px solid rgba(127, 195, 192, 0.16);
  pointer-events: none;
}
.hero::before {
  top: -140px;
  right: -120px;
  width: 420px;
  height: 420px;
}
.hero::after {
  bottom: -200px;
  left: 6%;
  width: 300px;
  height: 300px;
  border-color: rgba(127, 195, 192, 0.1);
}

@media (max-width: 640px) {
  .hero::before { width: 280px; height: 280px; top: -90px; right: -100px; }
  .hero::after { display: none; }
}
.hero-grid {
  position: relative;
  z-index: 1;
  width: 100%;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 26px;
  max-width: 760px;
}
.hero h1 {
  margin: 0;
  font-size: clamp(44px, 6vw, 78px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: var(--paper);
}
.hero h1 em {
  font-style: italic;
  font-weight: 600;
  color: var(--gold);
}
.hero p {
  margin: 0;
  max-width: 520px;
  font-size: 18px;
  line-height: 1.65;
  color: rgba(244, 242, 238, 0.72);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.btn {
  display: inline-block;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  font-size: 15px;
  padding: 15px 26px;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--turquoise);
  color: var(--ink) !important;
}
.btn-primary:hover { background: var(--gold); }
.btn-secondary {
  border: 1px solid rgba(244, 242, 238, 0.55);
  color: var(--paper) !important;
  background: transparent;
}
.btn-secondary:hover { background: var(--paper); border-color: var(--paper); color: var(--ink) !important; }

/* Šipka pro posun na obsah pod hero */
.hero-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 1;
  width: 28px;
  height: 44px;
  transform: translateX(-50%);
  border: 1.5px solid rgba(244, 242, 238, 0.45);
  border-radius: 14px;
}
.hero-scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  background: var(--gold);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: hero-scroll-cue-move 1.6s ease-in-out infinite;
}
@keyframes hero-scroll-cue-move {
  0% { top: 8px; opacity: 1; }
  70% { top: 22px; opacity: 0; }
  71% { top: 8px; opacity: 0; }
  100% { top: 8px; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-cue span { animation: none; }
}

/* Lightbox — klik na ukázku práce ji zobrazí přes celou obrazovku */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 56px;
  background: rgba(20, 20, 20, 0.94);
}
.lightbox.is-open { display: flex; }
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(244, 242, 238, 0.4);
  background: transparent;
  color: var(--paper);
  font-size: 18px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.lightbox-close:hover {
  border-color: var(--gold);
  color: var(--gold);
}

@media (max-width: 640px) {
  .hero {
    min-height: 0;
    padding: 130px 0 90px;
  }
}

/* Services */
.services {
  padding: 24px 0 88px;
  border-top: 1px solid var(--line);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 40px;
}
.service-tile {
  border: 1px solid var(--line);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: inherit;
  background: var(--paper);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.service-tile:hover,
.service-tile:focus-visible {
  transform: translateY(-4px);
  border-color: var(--turquoise);
  background: var(--paper-muted);
}
.service-number {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  color: var(--gold);
  font-weight: 600;
  transition: color 0.18s ease;
}
.service-tile:hover .service-number,
.service-tile:focus-visible .service-number {
  color: var(--turquoise);
}
.service-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.service-arrow {
  opacity: 0;
  transform: translateX(-6px);
  color: var(--turquoise);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.service-tile:hover .service-arrow,
.service-tile:focus-visible .service-arrow {
  opacity: 1;
  transform: translateX(0);
}
.service-desc {
  font-size: 14px;
  line-height: 1.55;
  color: #6b675f;
}

/* O mně */
.about {
  padding: 24px 0 88px;
  border-top: 1px solid var(--line);
}
.about-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 48px;
  align-items: center;
}
.about-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  max-width: 340px;
}
.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.about-copy p {
  margin: 0;
  max-width: 560px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-secondary);
}
.about-signature {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

@media (max-width: 640px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-photo {
    max-width: 220px;
  }
}

/* Work */
.work {
  padding: 8px 0 96px;
}
.section-heading-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 28px;
}
.section-heading-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-marker {
  width: 22px;
  height: 22px;
  background: var(--turquoise);
  flex-shrink: 0;
}
.section-heading-row h2 {
  margin: 0;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.section-heading-note {
  font-size: 14px;
  color: var(--text-tertiary);
}
.work-groups {
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.work-group-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.work-group-title::before {
  content: "";
  width: 14px;
  height: 14px;
  background: var(--turquoise);
  flex-shrink: 0;
}
.work-group-title--accent {
  font-size: 23px;
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}
.work-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.work-card-image {
  position: relative;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}
.work-card-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.work-title {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
}

/* Plakáty dostávají větší, portrétní dlaždice, aby vynikly */
.work-grid--posters {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.work-grid--posters .work-card-image {
  aspect-ratio: 3 / 4;
}
.work-grid--posters .work-card-image img {
  max-width: 100%;
  max-height: 100%;
}
.work-grid--posters .work-title {
  font-size: 18px;
}

/* Pruh referencí — loga jedou zleva doprava v nekonečné smyčce */
.logo-strip {
  padding: 40px 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.logo-strip-label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.logo-track {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.logo-track::-webkit-scrollbar { display: none; }
.logo-track.is-dragging { cursor: grabbing; scroll-behavior: auto; }
.logo-track-inner {
  display: flex;
  align-items: center;
  width: max-content;
  gap: 40px;
}
.logo-track-inner a {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 240px;
  height: 96px;
}
.logo-track-inner img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.7;
  filter: grayscale(1);
  transition: opacity 0.2s ease, filter 0.2s ease;
}
.logo-track-inner img.logo-na-dolni {
  max-width: 65%;
  max-height: 65%;
}
.logo-track:hover .logo-track-inner img {
  opacity: 1;
  filter: grayscale(0);
}


/* Contact */
.contact {
  background: var(--ink);
  color: var(--paper);
  padding: 72px clamp(28px, 5vw, 140px) 40px;
}
.contact-inner {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 48px;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.contact-logo {
  color: var(--paper);
  gap: 20px;
  margin-bottom: 8px;
}
.contact-logo svg { width: 150px; height: 150px; }
.contact-logo .logo-text { gap: 6px; }
.contact-logo .logo-number { color: var(--paper); font-size: 78px; }
.contact-logo .logo-subtitle { color: var(--text-tertiary-dark); font-size: 22px; letter-spacing: 0.25em; }
.contact-info h2 {
  margin: 0;
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.contact-info p {
  margin: 0;
  max-width: 420px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-tertiary-dark);
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 16px;
}
.contact-links a { color: var(--turquoise); }
.contact-links a:hover { color: var(--gold); }
.contact-name {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  color: var(--paper);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--paper);
  padding: 14px 16px;
  font-family: 'Work Sans', sans-serif;
  font-size: 15px;
  width: 100%;
}
.contact-form textarea { resize: vertical; }
.field-error {
  font-size: 13px;
  color: var(--gold);
  display: none;
}
.field-group.has-error .field-error { display: block; }
.field-group.has-error input,
.field-group.has-error select,
.field-group.has-error textarea {
  border-color: var(--gold);
}
.submit-btn {
  background: var(--turquoise);
  color: var(--ink);
  border: none;
  padding: 16px;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}
.submit-btn:hover { background: var(--gold); }
.submit-btn:disabled { opacity: 0.7; cursor: not-allowed; }
.form-status {
  font-size: 13px;
  color: var(--text-tertiary-dark);
  min-height: 1em;
}

/* Footer — kompaktní, jeden řádek, jemná značka na pozadí */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: rgba(244, 242, 238, 0.75);
}
.footer-mark {
  position: absolute;
  top: 50%;
  right: -40px;
  width: 220px;
  height: 220px;
  transform: translateY(-50%);
  opacity: 0.05;
  pointer-events: none;
}
.footer-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  justify-content: space-between;
  padding: 20px clamp(28px, 5vw, 140px);
  border-top: 1px solid rgba(244, 242, 238, 0.1);
  font-size: 12px;
  color: rgba(244, 242, 238, 0.4);
}
.footer-top-link {
  color: rgba(244, 242, 238, 0.55) !important;
}
.footer-top-link:hover { color: var(--gold) !important; }

@media (max-width: 640px) {
  .footer-bottom { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .main-nav { gap: 16px; }
}
