:root {
	--primary: #0089d7;
	--accent: #abdeff;
	--trans-link-color: rgba(0, 137, 215, .5);
	--nav-bg: rgba(0, 137, 215, .75);
	--card-bg: rgba(0, 137, 215, .1);
	--primary-hover: #00aeff;
	--error: #ff0000;
	--not-allowed: #d54a3b;
	--success: #00b71f;
	--warning: #ffa400;
	--partial: #ffbb57;
	--border: rgba(255, 255, 255, .75);
	--border-hover: #d1d5db;
	--text: #000;
	--text-light: #6b7280;
	--bg: #f0f0f0;
	--bg-secondary: #f9fafb;

	--radius: 6px;
	--padding: 0.5rem 0.75rem;
	--transition: 0.2s ease;

	--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	--shadow-focus: 0 0 0 3px rgba(59, 130, 246, 0.2);

	--backdrop-color: rgba(255, 255, 255, .75);
	--backdrop-blur: .5rem;
}
@supports (color: oklch(0 0 0)) {
	:root {
		--primary: oklch(60% .1788 240);
		--accent: oklch(0.8769 0.073 240);
		--trans-link-color: oklch(60% .1788 240 / 50%);
		--nav-bg: oklch(60% .1788 240 / 75%);
		--card-bg: oklch(60% .1788 240 / 10%);
		--primary-hover: oklch(0.7148 0.1788 240);
		--error: oklch(0.628 0.2875 29.23);
		--not-allowed: oklch(0.6 0.1773 29.38);
		--success: oklch(0.6667 0.2535 146.51);
		--success-hover: oklch(0.75 0.2535 146.51);
		--warning: oklch(0.8008 0.1986 70.08);
		--partial: oklch(0.7196 0.1641 70.08);

		--shadow-focus: oklch(0.6792 0.2019 240 / 20%);
	}
}

@font-face { font-family: 'Roboto'; font-weight: 100; src: url('/yachtmaster/fonts/roboto-v29-latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-100.woff'); }
@font-face { font-family: 'Roboto'; font-weight: 400; src: url('/yachtmaster/fonts/roboto-v29-latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff'); }
@font-face { font-family: 'Roboto'; font-weight: 500; src: url('/yachtmaster/fonts/roboto-v29-latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-500.woff'); }
@font-face { font-family: 'Roboto'; font-weight: 900; src: url('/yachtmaster/fonts/roboto-v29-latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-900.woff'); }

* { font-family: Roboto,sans-serif; box-sizing: border-box; line-height: 1.5; scroll-behavior: smooth; }

html, body { margin: 0; padding: 0; min-height: 100%; background: #f0f0f0; }
img { display: block; width: clamp(100%, 75rem, 250vw); margin: 0 auto; position: relative; left: 50%; transform: translateX(-50%); }

iframe { height: min(60vh, 60rem); }

#first-screen { height: 100vh; display: flex; justify-content: center; align-items: center; background: var(--primary) url(studio.jpg) no-repeat center center; background-size: cover; position: relative; }

.logo { width: min(7rem, 14vw); height: auto; fill: #fff; display: block; }
.yachtmaster { width: 100%; height: 100%; width: min(3.5rem, 7vw); height: min(3.5rem, 7vw); fill: #fff; display: block; }
.content { margin: 0 auto; max-width: 70rem; padding: 0 2rem; }
form { background-color: background-color: rgba(0, 89, 145, .75); color: #fff; padding: 2rem 0; }
form > * { margin: 0 auto; max-width: 50rem; padding-inline: 2rem; }
.cards, .video { display: flex; flex-wrap: wrap; gap: 2rem; margin: 2rem; }
.cards > div { width: calc(16.6667% - 1.6667rem); flex-grow: 0; text-align: center; background: var(--card-bg); padding: 1rem; }
.video > div { width: calc(16.6667% - 1.6667rem); flex-grow: 0; text-align: center; }
.video img, .cards > div { border-radius: var(--radius); box-shadow: 0 1rem 1rem -1rem rgba(0,0,0,.5); }

nav { position: fixed; top: 0; left: 0; right: 0; color: #fff; background-color: var(--nav-bg); font-size: 150%; display: flex; align-items: center; -webkit-backdrop-filter: blur(var(--backdrop-blur)); backdrop-filter: blur(var(--backdrop-blur)); overflow-x: auto; height: 5rem; z-index: 2; }
nav a, nav a:visited, nav a:active { color: #fff; text-decoration: none; padding: 1rem 2rem; display: flex; align-items: center; height: 100%; white-space: nowrap; }
nav a.current { background: var(--primary); }

a[name] { position: relative; top: -5.5rem; display: block; }

a.dialog-link:not(.no-bg) { background: var(--accent); z-index: 1; position: relative; padding: .25em .5em; margin: -.25em -.5em; border-radius: var(--radius); font-weight: 900; }

h1 { font-size: min(8vh, 8vw); font-weight: 900; text-align: center; color: #fff; line-height: 1; text-shadow: 0 0 50px var(--primary); }
h2 { font-size: 2.5rem; font-weight: 900; margin-top: 2em; line-height: 1.1; }
h3 { font-size: 1.7rem; font-weight: 900; line-height: 1.3; }
.cards h3 { margin-block: 0; }
h3 + p { padding-top: 0; }
h3:has(+ p) { margin-bottom: 0; }
h4 { font-size: 1.7rem; font-weight: 500; margin-bottom: 1rem; line-height: 1.3; }
p { font-size: 1.25rem; margin: 0; padding-block: 1em; }
th, td { vertical-align: top; text-align: left; padding-block: .75rem; }
a, a:active, a:visited { color: var(--primary); text-decoration: underline; text-decoration-thickness: .03em; text-decoration-color: var(--trans-link-color); text-decoration-skip: none; text-decoration-skip-ink: none; }

.dialog-backdrop { position: fixed; inset: 0; background: var(--backdrop-color); -webkit-backdrop-filter: blur(var(--backdrop-blur)); backdrop-filter: blur(var(--backdrop-blur)); display: flex; align-items: top; padding-top: 5vh; justify-content: center; overscroll-behavior: none; display: none; z-index: 2; }
.dialog { background: #fff; width: max(33.333%, 55rem); min-height: 33.333%; max-height: 90vh; height: max-content; box-shadow: var(--shadow-sm); border-radius: calc(var(--radius) * 4); padding: 2rem 4rem; overflow: auto; box-shadow: 0 1rem 1rem -1rem rgba(0,0,0,.5); }
.dialog a { color: #fff; text-decoration-color: #fff; }

#message .dialog { max-width: 40rem; min-height: 0; border: 1px solid var(--primary); border-top-width: .25rem; }
#message .dialog a { color: var(--primary); text-decoration-color: var(--trans-link-color); }

#order .dialog { background-color: var(--primary); color: #fff; border: 1px solid var(--primary-hover); border-top-width: .25rem; }
#order button { border: 1px solid var(--border); }

.dialog-footer { position: sticky; left: 0; right: 0; bottom: -2rem; margin: 1rem -4rem -2rem; background: #fff; }
.dialog-footer button:first-child:last-child { width: 100%; }

button.success { background-color: var(--success); }
button.success:hover { background-color: var(--success-hover); }

footer { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255, 255, 255, .6667); font-size: 125%; display: flex; align-items: center; gap: 2rem; -webkit-backdrop-filter: blur(var(--backdrop-blur)); backdrop-filter: blur(var(--backdrop-blur)); overflow-x: auto; height: 3rem; z-index: 1; padding-inline: 2rem; }
footer * { white-space: nowrap; }

/* 200rem ≈ 3200px (если 1rem = 16px) */
@media screen and (max-width: 200rem) {
    .cards > div { width: calc(25% - 1.5rem); }
}

/* 135rem ≈ 2160px */
@media screen and (max-width: 135rem) {
    .cards > div { width: calc(33.3333% - 1.3333rem); }
    .video > div { width: calc(25% - 1.5rem); }
}

/* 90rem ≈ 1440px */
@media screen and (max-width: 90rem) {
    .cards > div { width: calc(50% - 1rem); }
    .video > div { width: calc(33.333% - 1.5rem); }
}

/* 60rem ≈ 960px */
@media screen and (max-width: 60rem) {
	h2 { font-size: 2rem; }
	h3, h4 { font-size: 1.5rem; }
	p { font-size: 1rem; }
    .cards > div { width: 100%; }
    .video > div { width: calc(50% - 1rem); }
    nav { height: 4rem; font-size: 1.25rem; }
    .dialog-backdrop { padding: 0; }
    .dialog { width: 100vw; height: 100vh; height: 100dvh; max-height: unset; border-radius: 0; padding: .25rem; }
    .dialog-footer { bottom: -.25rem; margin: 0 -0.25rem; }
    nav a, nav a:visited, nav a:active { padding: .5rem 1rem; }
    footer { padding-inline: 1rem; }
    .content { padding-inline: 1rem; }
    .cards, .video { margin-inline: 1rem; gap: 1rem; }
}

/* 40rem ≈ 640px (мобильные устройства) */
@media screen and (max-width: 40rem) {
    .video > div { width: 100%; }
}

.video > div img { width: 100%; }

.wide { width: 100%; }

.brick { overflow: hidden; }

svg { display: block; }

.calendar *, .timeline * { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }

.calendar { margin-top: 1.25rem; display: grid; grid-template-columns: repeat(7, minmax(3rem, 1fr)); gap: .25rem; max-width: 30rem; font-size: 1.25rem; border-radius: var(--radius); overflow: hidden; }
.calendar > * { background: rgba(255, 255, 255, .1); aspect-ratio: 1; display: grid; place-items: center; cursor: pointer; }
.calendar > .busy, .timeline .busy { background: var(--not-allowed); /*color: var(--error);*/ cursor: not-allowed; }
.calendar > .partial { background: var(--partial); position: relative; }
.calendar > .selected, .timeline-switch.selected { background: var(--success) !important; }
.calendar > .partial.selected::after, .calendar > .partial:hover::after { content: ''; position: absolute; top: 0; right: 0; width: 0; height: 0; border-style: solid; border-width: 0 1rem 1rem 0; border-color: transparent var(--warning) transparent transparent; }
.calendar > .empty { opacity: .33; }
.calendar > .date:hover:not(.busy, .empty) { background: var(--primary-hover); }
.calendar > .header, .calendar > .empty { cursor: default; }

.calendar > .today { box-shadow: inset 0 0 0 .125rem #fff; opacity: 1; }

#calendar-comments { display: inline-block; width: 360px; }

#month { padding-inline: 2rem; }
.month { display: flex; justify-content: space-between; align-items: center; font-size: 1.25rem; width: 360px; }

.timeline { position: relative; font-size: 1.25rem; }
.timeline-numbers { position: relative; display: flex; flex-direction: column; gap: .25rem; padding: .25rem 1rem; z-index: 1; pointer-events: none; }
.timeline-controls { position: absolute; inset: 0; top: 1.25rem; display: flex; flex-direction: column; gap: .25rem; border-radius: var(--radius); overflow: hidden; height: max-content; }
.timeline-controls > div { background: rgba(255,255,255,.1); padding-inline: .75rem; }
.timeline-switch:not(.busy) { cursor: pointer; }
.timeline-switch:not(.busy):hover { background: var(--primary-hover); }

.sidebyside { display: flex; gap: 2rem; align-items: flex-start; }

.corner { position: sticky; top: 0; right: 0; }

label { padding-block: .2rem; margin-block: -.2rem; }

/* Базовые стили */
input:not([type="checkbox"], [type="radio"]), textarea, select, button { font: inherit; margin: 0; padding: var(--padding); color: var(--text); background-color: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition); width: 100%; box-sizing: border-box; }

/* Автоматический resize textarea */
textarea { min-height: 4em; max-height: min(16em, 50vh); resize: none; overflow-y: auto; font-size: 1.25rem; }

/* Состояния полей */
input:not([type="checkbox"], [type="radio"]):hover, textarea:hover, select:hover { border-color: var(--border-hover); }
input:not([type="checkbox"], [type="radio"]):focus, textarea:focus, select:focus { outline: 0; border-color: var(--primary); box-shadow: var(--shadow-focus); }
:disabled { opacity: 0.6; cursor: not-allowed; background-color: var(--bg-secondary); }

/* Валидация */
/*input:invalid, textarea:invalid { border-color: var(--error); }
input:valid:not(:placeholder-shown), textarea:valid:not(:placeholder-shown) { border-color: var(--success); }
*/
/* Кастомные checkbox/radio */
input[type="checkbox"], input[type="radio"] { width: 1.5rem; height: 1.5rem; margin-right: 0.5rem; vertical-align: -45%; appearance: none; -webkit-appearance: none; border: 1px solid var(--border); transition: background-color var(--transition), border-color var(--transition); }
input[type="checkbox"] { border-radius: var(--radius); }
input[type="radio"] { border-radius: 50%;}
input[type="checkbox"]:checked { background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='m10 21.8-9.8-9.8 3.6-3.5 6.2 6.2 10.2-10.2 3.6 3.5z'/%3E%3C/svg%3E") center no-repeat; background-size: 100%;}
input[type="radio"]:checked { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Ccircle cx='12' cy='12' r='7'/%3E%3C/svg%3E") center no-repeat; background-size: 100%;}

/* Кастомный select */
select { appearance: none; -webkit-appearance: none;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236b7280'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 1rem; padding-right: 2.5rem; }

/* Кастомный file input */
.file-input-wrapper { position: relative; overflow: hidden; display: inline-block; width: 100%; }
.file-input-wrapper input[type="file"] { position: absolute; left: 0; top: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.file-input-custom { display: flex; align-items: center; justify-content: space-between; padding: var(--padding); border: 1px solid var(--border); border-radius: var(--radius); background-color: var(--bg-secondary); color: var(--text-light); }
.file-input-custom:hover { border-color: var(--border-hover); }
.file-input-custom::after { content: 'Выбрать файл'; background-color: var(--primary); color: white; padding: 0.25rem 0.75rem; border-radius: calc(var(--radius) - 2px); font-size: 0.875rem; transition: background-color var(--transition); }

.file-input-custom:hover::after { background-color: var(--primary-hover); }

/* Кнопки */
button, input[type="button"], input[type="submit"], input[type="reset"] { display: inline-flex; align-items: center; justify-content: center; width: auto; background-color: var(--primary); color: white; cursor: pointer; border: 0; padding: 0.625rem 1.25rem; font-weight: 500; box-shadow: var(--shadow-sm); vertical-align: middle; }

button:hover, input[type="button"]:hover, input[type="submit"]:hover { background-color: var(--primary-hover); }

button:active, input[type="button"]:active, input[type="submit"]:active { padding-block: .75rem .5rem; }

/* Группы и легенда */
/*fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.5rem; }
legend { padding: 0 0.5rem; font-weight: 500; color: var(--text); }
*/
/* Сообщения об ошибках */
/*.error-message { display: none; font-size: 0.875rem; margin-top: 0.25rem; color: var(--error); animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); }}

input:invalid ~ .error-message, textarea:invalid ~ .error-message { display: block; }
input, textarea, button { -webkit-appearance: none; -moz-appearance: none; appearance: none; }
*/
/* Для Safari */
@media not all and (min-resolution: 0.001dpcm) { @supports (-webkit-appearance: none) { select { padding-right: 1.5rem; }}}

.sending { background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2MCAzMCIgZmlsbD0iI2ZmZiI+PGNpcmNsZSBjeD0iMTAiIGN5PSIxNSIgcj0iMyI+PGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ib3BhY2l0eSIgZHVyPSIxcyIgdmFsdWVzPSIwOzA7MTswOzAiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMCIvPjwvY2lyY2xlPjxjaXJjbGUgY3g9IjIwIiBjeT0iMTUiIHI9IjMiPjxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9Im9wYWNpdHkiIGR1cj0iMXMiIHZhbHVlcz0iMDswOzE7MDswIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49Ii4xIi8+PC9jaXJjbGU+PGNpcmNsZSBjeD0iMzAiIGN5PSIxNSIgcj0iMyI+PGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ib3BhY2l0eSIgZHVyPSIxcyIgdmFsdWVzPSIwOzA7MTswOzAiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iLjIiLz48L2NpcmNsZT48Y2lyY2xlIGN4PSI0MCIgY3k9IjE1IiByPSIzIj48YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiBkdXI9IjFzIiB2YWx1ZXM9IjA7MDsxOzA7MCIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGJlZ2luPSIuMyIvPjwvY2lyY2xlPjxjaXJjbGUgY3g9IjUwIiBjeT0iMTUiIHI9IjMiPjxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9Im9wYWNpdHkiIGR1cj0iMXMiIHZhbHVlcz0iMDswOzE7MDswIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49Ii40Ii8+PC9jaXJjbGU+PC9zdmc+) no-repeat 50% 50%; color: transparent !important; }

